eac_ruby_utils 0.103.0 → 0.104.0

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: 4a255c998a0548aa5e8367b8f620620ed10c3815cf6cfa7bb91a0f4375c819db
4
- data.tar.gz: 8b8dad7b6318319a4e4c2696c13b55f961d7cfa7042aa2723560d08cfec29f16
3
+ metadata.gz: 744b6385ba484515339bcfb778ca5f130e8a830bd1e96d8e8098d114f520473c
4
+ data.tar.gz: e508cd9b3c3b2c2f49e374d42a3b5b01bed648134ac3c46ca479c611071c252d
5
5
  SHA512:
6
- metadata.gz: 35719457a0c1fd6e7899c2ed268fa3f6f699ec6cca8da046a4e0d6d6fcc785db7a91ddb2638c86af6ca0f49cb1cf5d1e63958795dfbf46eb6dc7c9a3a9ffc3cb
7
- data.tar.gz: f9586ed06df1e3fe7ecb358df065ce42c6c2231f2b964b2e8f908c877acbcee23e5c425e3722c17105f845e48109c6bfffcf021f115f92327de96436014bca6a
6
+ metadata.gz: b2896356ed70030f1be88e9b7ee080762548561204b2b62ea2b14f8b58bf718bedf1fa0048ada5e9caf623cf4b103b49ca090f1ea41bc1459f86a441391d6bb9
7
+ data.tar.gz: 66884fc4b103e9fd62ddf6029787baf460c64efa9738505268a40c54cbcde544cb440215dd31a3a8ebab097f407ce1011803e735fcf8f8ce013b19df11bbdaf8
@@ -13,7 +13,7 @@ module EacRubyUtils
13
13
  end
14
14
 
15
15
  class Setup
16
- common_constructor :method_class do
16
+ common_constructor :method_class, :static_method, default: [false] do
17
17
  perform
18
18
  end
19
19
 
@@ -29,7 +29,9 @@ module EacRubyUtils
29
29
  end
30
30
 
31
31
  def sender_module
32
- method_class.module_parent
32
+ r = method_class.module_parent
33
+ r = r.singleton_class if static_method
34
+ r
33
35
  end
34
36
  end
35
37
  end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/static_method_class'
4
+
5
+ class Module
6
+ def enable_static_method_class
7
+ ::EacRubyUtils.patch(self, ::EacRubyUtils::StaticMethodClass)
8
+ end
9
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/method_class'
4
+ require 'eac_ruby_utils/patches/module/common_concern'
5
+
6
+ module EacRubyUtils
7
+ module StaticMethodClass
8
+ common_concern do
9
+ ::EacRubyUtils::MethodClass::Setup.new(self, true)
10
+ end
11
+ end
12
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyUtils
4
- VERSION = '0.103.0'
4
+ VERSION = '0.104.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_ruby_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.103.0
4
+ version: 0.104.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-13 00:00:00.000000000 Z
11
+ date: 2022-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -37,6 +37,9 @@ dependencies:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
39
  version: '2.8'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 2.8.1
40
43
  type: :runtime
41
44
  prerelease: false
42
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -44,6 +47,9 @@ dependencies:
44
47
  - - "~>"
45
48
  - !ruby/object:Gem::Version
46
49
  version: '2.8'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 2.8.1
47
53
  - !ruby/object:Gem::Dependency
48
54
  name: bundler
49
55
  requirement: !ruby/object:Gem::Requirement
@@ -189,8 +195,10 @@ files:
189
195
  - lib/eac_ruby_utils/patches/class.rb
190
196
  - lib/eac_ruby_utils/patches/class/abstract.rb
191
197
  - lib/eac_ruby_utils/patches/class/common_constructor.rb
198
+ - lib/eac_ruby_utils/patches/class/method_class.rb
192
199
  - lib/eac_ruby_utils/patches/class/self_included_modules.rb
193
200
  - lib/eac_ruby_utils/patches/class/settings_provider.rb
201
+ - lib/eac_ruby_utils/patches/class/static_method_class.rb
194
202
  - lib/eac_ruby_utils/patches/enumerable.rb
195
203
  - lib/eac_ruby_utils/patches/enumerable/boolean_combinations.rb
196
204
  - lib/eac_ruby_utils/patches/enumerator.rb
@@ -210,7 +218,6 @@ files:
210
218
  - lib/eac_ruby_utils/patches/module/i18n_translate.rb
211
219
  - lib/eac_ruby_utils/patches/module/immutable.rb
212
220
  - lib/eac_ruby_utils/patches/module/listable.rb
213
- - lib/eac_ruby_utils/patches/module/method_class.rb
214
221
  - lib/eac_ruby_utils/patches/module/module_parent.rb
215
222
  - lib/eac_ruby_utils/patches/module/patch.rb
216
223
  - lib/eac_ruby_utils/patches/module/require_sub.rb
@@ -265,6 +272,7 @@ files:
265
272
  - lib/eac_ruby_utils/speaker.rb
266
273
  - lib/eac_ruby_utils/speaker/receiver.rb
267
274
  - lib/eac_ruby_utils/speaker/sender.rb
275
+ - lib/eac_ruby_utils/static_method_class.rb
268
276
  - lib/eac_ruby_utils/string_delimited.rb
269
277
  - lib/eac_ruby_utils/struct.rb
270
278
  - lib/eac_ruby_utils/version.rb