method_man 3.0.0 → 3.0.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: 27ac0306df7dc6d12ff3eb481fde1a960c1a5356cad96edcc682058536d2150a
4
- data.tar.gz: c6b4856e53dc9fd820a32505da6eed2f2da26ba45253f566e735cea9e8aad84b
3
+ metadata.gz: b53cee278d7e41a29dccd2ca0219b34d112d4ac7bd1a070662d23a1c29dde5f3
4
+ data.tar.gz: 483d234c24b309e7ad44391f9aa5cd20626d48182da9dae32857abb618b33629
5
5
  SHA512:
6
- metadata.gz: ab1e722b4c5e2bfd01b3e70c4504a14c1bb592918bd8fe048d14045f937113912ae6341fc2cf144cff4de25b8aa9a0f6489847149866c8308d8fdc13a0b5961c
7
- data.tar.gz: ffde0b87325abf0f187f4cb712286128151e3e782d027e2f6566bdfd6c5ef58eba9761154b443edd51ceee7c0bebdedda824571b1c84dbfd6d9ccaa52e27edcb
6
+ metadata.gz: 6033ad21000327166dd5cfc3601a649fd51cc54db074e83de454fd999bfae106f7bb5e535896c1bdd0d8c8581b3872b81a7babb6e517db0a8f56bbfee1a74696
7
+ data.tar.gz: 33b950b76bc8657b58214e068275ff2f6497536bdb5443a9a853df35caf74076b71ac1774ed1ab5554caac4dc859bb6ad2d54bad971c68874385beba20a92c10
@@ -124,49 +124,4 @@ class MethodObject < SimpleDelegator
124
124
  "#{attribute}_"
125
125
  end
126
126
  end
127
-
128
- # Dynamically defines custom attr_readers and initializer.
129
- class Setup < SimpleDelegator
130
- def self.call(attributes:, subclass:)
131
- new(attributes, subclass).call
132
- end
133
-
134
- attr_accessor(:attributes)
135
-
136
- def initialize(attributes, subclass)
137
- self.attributes = attributes
138
- super(subclass)
139
- end
140
-
141
- def call
142
- define_attr_readers
143
- define_initializer
144
- end
145
-
146
- private
147
-
148
- def define_attr_readers
149
- __getobj__.send(:attr_reader, *attributes)
150
- end
151
-
152
- def define_initializer
153
- class_eval(<<-RUBY, __FILE__, __LINE__ + 1)
154
- def initialize(#{required_keyword_args_string})
155
- #{assignments}
156
- end
157
- RUBY
158
- end
159
-
160
- def required_keyword_args_string
161
- attributes.map { |arg| "#{arg}:" }.join(', ')
162
- end
163
-
164
- def assignments
165
- attributes.map { |attribute| "@#{attribute} = #{attribute}\n" }.join
166
- end
167
- end
168
-
169
- def respond_to_missing?(*args)
170
- super || __getobj__.respond_to?(*args)
171
- end
172
127
  end
@@ -3,5 +3,5 @@
3
3
  require('delegate')
4
4
 
5
5
  class MethodObject < SimpleDelegator
6
- VERSION = '3.0.0'
6
+ VERSION = '3.0.1'
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: method_man
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clay Shentrup