u-case 3.0.0.rc8 → 3.0.0.rc9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c2265a60386ce542b8ee6006a58d4fb801dcfb396d7dfcf84d342910095fcbf8
4
- data.tar.gz: 1502d1a284c616860ae99e0c03fe02a81be3e9d0adc0cc75a414825b4132f792
3
+ metadata.gz: 758ce4bd700ff2d362bcec72b000f6c8b7cccd948c65ad43aa62e7af5c41f924
4
+ data.tar.gz: bcbcb6638c5fe9edfc9853fcb6099a485df322a491d96f81f6f9278c33dba98d
5
5
  SHA512:
6
- metadata.gz: ab5c45e1e1e12f157a4e5f5fa596fdb778e6bd6267d5111e438094ff37e017a0452e4a1d85a39df0e63ec28876260bad8f7c4a56ca18796a95805187efe2d002
7
- data.tar.gz: 6cefcdbbb39a4400bbd4c52b7ccf77f2c142958680049a3e53f4af37d1ef696fdc3a9019cde0f8f18463dd814e79e9753ef5a270eb446dbb2bee81e7c734ffab
6
+ metadata.gz: ed85f77d590791c8191df21bd96a12b55e2bf12ff269fd2ebe6a2103f4ce0d6cbe624b47a42eda0910bcaf0b8676770590cf1be87d86a201a0cbbf9d5a2597b7
7
+ data.tar.gz: 5dae9cdb67a90ada4dbe0b4f6f1c87ee5a5029331e25aa16cecfaaab416458bf4591fa80b2ddf466a5445312484513ce59ef6b93f3bc3ab951e4742139d4d77c
data/README.md CHANGED
@@ -21,7 +21,7 @@ The main project goals are:
21
21
 
22
22
  Version | Documentation
23
23
  --------- | -------------
24
- 3.0.0.rc8 | https://github.com/serradura/u-case/blob/main/README.md
24
+ 3.0.0.rc9 | https://github.com/serradura/u-case/blob/main/README.md
25
25
  2.6.0 | https://github.com/serradura/u-case/blob/v2.x/README.md
26
26
  1.1.0 | https://github.com/serradura/u-case/blob/v1.x/README.md
27
27
 
@@ -79,7 +79,7 @@ Version | Documentation
79
79
 
80
80
  | u-case | branch | ruby | activemodel |
81
81
  | -------------- | ------- | -------- | ------------- |
82
- | 3.0.0.rc8 | main | >= 2.2.0 | >= 3.2, < 6.1 |
82
+ | 3.0.0.rc9 | main | >= 2.2.0 | >= 3.2, < 6.1 |
83
83
  | 2.6.0 | v2.x | >= 2.2.0 | >= 3.2, < 6.1 |
84
84
  | 1.1.0 | v1.x | >= 2.2.0 | >= 3.2, < 6.1 |
85
85
 
@@ -102,7 +102,7 @@ Version | Documentation
102
102
  Add this line to your application's Gemfile:
103
103
 
104
104
  ```ruby
105
- gem 'u-case', '~> 3.0.0.rc8'
105
+ gem 'u-case', '~> 3.0.0.rc9'
106
106
  ```
107
107
 
108
108
  And then execute:
@@ -21,7 +21,7 @@ Principais objetivos deste projeto:
21
21
 
22
22
  Versão | Documentação
23
23
  --------- | -------------
24
- 3.0.0.rc8 | https://github.com/serradura/u-case/blob/main/README.md
24
+ 3.0.0.rc9 | https://github.com/serradura/u-case/blob/main/README.md
25
25
  2.6.0 | https://github.com/serradura/u-case/blob/v2.x/README.md
26
26
  1.1.0 | https://github.com/serradura/u-case/blob/v1.x/README.md
27
27
 
@@ -78,7 +78,7 @@ Versão | Documentação
78
78
 
79
79
  | u-case | branch | ruby | activemodel |
80
80
  | -------------- | ------- | -------- | ------------- |
81
- | 3.0.0.rc8 | main | >= 2.2.0 | >= 3.2, < 6.1 |
81
+ | 3.0.0.rc9 | main | >= 2.2.0 | >= 3.2, < 6.1 |
82
82
  | 2.6.0 | v2.x | >= 2.2.0 | >= 3.2, < 6.1 |
83
83
  | 1.1.0 | v1.x | >= 2.2.0 | >= 3.2, < 6.1 |
84
84
 
@@ -101,7 +101,7 @@ Versão | Documentação
101
101
  Adicione essa linha ao Gemfile da sua aplicação:
102
102
 
103
103
  ```ruby
104
- gem 'u-case', '~> 3.0.0.rc8'
104
+ gem 'u-case', '~> 3.0.0.rc9'
105
105
  ```
106
106
 
107
107
  E então execute:
@@ -165,19 +165,16 @@ module Micro
165
165
 
166
166
  private
167
167
 
168
- def __call_with_accumulated_data(fn, opt = nil)
169
- input =
170
- __update_transitions_accessible_attributes(
171
- opt ? opt.merge(@__transitions_accumulated_data) : @__transitions_accumulated_data
172
- )
173
-
174
- return fn.call if fn.arity.zero?
175
-
176
- opt ? fn.call(**input) : fn.call(input)
168
+ def __fetch_accumulated_data(opt = nil)
169
+ __update_transitions_accessible_attributes(
170
+ opt ? opt.merge(@__transitions_accumulated_data) : @__transitions_accumulated_data
171
+ )
177
172
  end
178
173
 
179
174
  def __call_proc(fn, expected)
180
- result = __call_with_accumulated_data(fn)
175
+ input = __fetch_accumulated_data
176
+
177
+ result = fn.arity.zero? ? fn.call : fn.call(input)
181
178
 
182
179
  return self if result === self
183
180
 
@@ -185,7 +182,9 @@ module Micro
185
182
  end
186
183
 
187
184
  def __call_method(methd, attributes = nil)
188
- result = __call_with_accumulated_data(methd, attributes)
185
+ input = __fetch_accumulated_data(attributes)
186
+
187
+ result = methd.arity.zero? ? methd.call : methd.call(**input)
189
188
 
190
189
  return self if result === self
191
190
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Micro
4
4
  class Case
5
- VERSION = '3.0.0.rc8'.freeze
5
+ VERSION = '3.0.0.rc9'.freeze
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: u-case
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.rc8
4
+ version: 3.0.0.rc9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Serradura