rule_box 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a011e4b78807c6886b9459bf0a2e7d5b189529f89afaaf6af031c53e2a020b2
4
- data.tar.gz: bd2bb85082c2f97fde224cc3c56442408ed7a55f9fd025a7bd72acaa637d5777
3
+ metadata.gz: 93a607676433feab4de64825c8765e739e1e1a417e93d4fbedb9548ea8aea3b8
4
+ data.tar.gz: 508c284e6ecf27dcdea4e6bf5c312347f91d3ef6fad02d248e7a2a7e95358691
5
5
  SHA512:
6
- metadata.gz: a70aa27e89b761ccac09eba4ee77a5630eb74122bb7ace331b05ffd0c0480f81da65f641ad76f72a563665fd3a1af590af046e54d6301ed3d015fcb5773a31f2
7
- data.tar.gz: 1cbff9c41ad00c46f69164558d057b687428b4d7ebd1ad403038d099f4c25a37b61dfd5a4520ae6a6818635122925dd9943a2cde300eb90183cf23054ef692ca
6
+ metadata.gz: 85ae54a48bc97c4cc052cf1b4fde1ffd62162e7445f2a1380968a845057505db8fc6602d660c2b9d53170c03eab5487170091d753dea9513b90be5ccc9f3a19e
7
+ data.tar.gz: ef89ef6c0086f7b3162586a6fdc0f36b250d7823033e85f608495223b07d67852ecc3f8c7c77b6aa137a0c3290d8f8b71d84f2c2e7bc7fc1580d4d80fae69a25
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rule_box (0.1.0)
4
+ rule_box (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class RuleBox::Facade
4
- attr_reader :model, :status, :data, :bucket, :errors, :steps, :executed
4
+ attr_reader :model, :status, :data, :bucket, :errors, :steps, :executed, :_current_method
5
5
  attr_accessor :show_steps
6
6
 
7
7
  def initialize(**dependencies)
@@ -44,7 +44,7 @@ class RuleBox::Facade
44
44
 
45
45
  def attributes
46
46
  attrs = {}
47
- %i[model status data bucket executed errors steps].each do |key|
47
+ %i[model status data bucket executed errors steps _current_method].each do |key|
48
48
  value = send key
49
49
  attrs[key] = value
50
50
  end
@@ -92,6 +92,7 @@ class RuleBox::Facade
92
92
 
93
93
  def pre_process(method, model)
94
94
  @model = model
95
+ @_current_method = method
95
96
  class_name = check_class_model
96
97
  @errors = []
97
98
  @steps = []
@@ -36,6 +36,10 @@ module RuleBox::Getter
36
36
  @facade.steps.clone
37
37
  end
38
38
 
39
+ def _current_method
40
+ @facade._current_method
41
+ end
42
+
39
43
  def executed
40
44
  @facade.executed
41
45
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RuleBox
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.email = ['ralphsbaesso@gmail.com', 'nathanmeira1@gmail.com']
10
10
 
11
11
  spec.summary = 'RuleBox'
12
- spec.description = 'Gerenciamento de fluxo de regra de negócio.'
12
+ spec.description = 'This gem is focused in giving a strong and concrete way to manage your business rules, mixing the best of both worlds in Facade and Strategy, bringing you a simplified way to apply these Design Patterns into your project.'
13
13
  spec.homepage = 'https://github.com/ralphsbaesso'
14
14
  spec.license = 'MIT'
15
15
  spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rule_box
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ralph Baesso
@@ -9,9 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-09-12 00:00:00.000000000 Z
12
+ date: 2020-10-08 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: Gerenciamento de fluxo de regra de negócio.
14
+ description: This gem is focused in giving a strong and concrete way to manage your
15
+ business rules, mixing the best of both worlds in Facade and Strategy, bringing
16
+ you a simplified way to apply these Design Patterns into your project.
15
17
  email:
16
18
  - ralphsbaesso@gmail.com
17
19
  - nathanmeira1@gmail.com