eac_ruby_utils 0.52.0 → 0.53.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: d1cd6f8891c93e7a6a866a11fa705c3ce0609b5b0d6b5e5468d73a46ed135121
4
- data.tar.gz: 49a544fac4a944b2c58ad8cbd0f06eeec6a3e9e5e1df4a66872bdd34bf79c1ef
3
+ metadata.gz: 8a940f8552466eaafa352add89628375c73a4bc93132d6a85308ed8734806112
4
+ data.tar.gz: ee918b5a6e350bfff2e835fbc36c4167c06c13ae264039b2e6281d217538029f
5
5
  SHA512:
6
- metadata.gz: 00e8db1cb8da1ed4b54aee6e704820b8962b22e5f9bdb0321354db5ed044cd1799024775c8704765a25d302d2cce776de2511e511665b5d55d00150c3e897271
7
- data.tar.gz: 8da830a3af85dc78d88b919645522cdec79e52c61086517b35bb9a64a14e5f9d4bc2af067f9cef31153268e1b1522b7adbad3e0507d04a62fcd2255e9f090d2f
6
+ metadata.gz: 55d385b536020ab4a7f295e88eeccb2baa93cb329d0d7fa4e8c968ba2e1f89f4412e1c6d497614a6433f78a95fce27889f1062d6cfd9fbe95dbae6317bee70b3
7
+ data.tar.gz: b06d996d30f1d6db36d9d2b3d4f67ba6a730f6afb1d41f08e6be4718cb063b2b4171bc609b8e07f0b304ee09440c60eca798e10b8957d1ee0d3f5505e9fdf2f4
@@ -29,10 +29,11 @@ module EacRubyUtils
29
29
 
30
30
  module ClassMethods
31
31
  def abstract_methods(*methods_names)
32
- @abstract_methods ||= Set.new
33
- @abstract_methods += methods_names.map(&:to_sym)
34
-
35
- @abstract_methods.to_enum
32
+ methods_names.each do |method_name|
33
+ define_method method_name do
34
+ raise_abstract_method(method_name)
35
+ end
36
+ end
36
37
  end
37
38
  end
38
39
 
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/abstract_methods'
4
+
5
+ class Module
6
+ def enable_abstract_methods(*methods)
7
+ include ::EacRubyUtils::AbstractMethods
8
+ abstract_methods(*methods)
9
+ end
10
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyUtils
4
- VERSION = '0.52.0'
4
+ VERSION = '0.53.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.52.0
4
+ version: 0.53.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: 2020-11-28 00:00:00.000000000 Z
11
+ date: 2020-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -194,6 +194,7 @@ files:
194
194
  - lib/eac_ruby_utils/patches/hash/options_consumer.rb
195
195
  - lib/eac_ruby_utils/patches/hash/sym_keys_hash.rb
196
196
  - lib/eac_ruby_utils/patches/module.rb
197
+ - lib/eac_ruby_utils/patches/module/abstract_methods.rb
197
198
  - lib/eac_ruby_utils/patches/module/common_concern.rb
198
199
  - lib/eac_ruby_utils/patches/module/console_speaker.rb
199
200
  - lib/eac_ruby_utils/patches/module/immutable.rb