k_builder 0.0.39 → 0.0.40

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: 5c8b5b5e5cc829fc8d5239d970cda55ef650e6d0b6bc5e6474a4d4172bde0661
4
- data.tar.gz: c326954d805393dc3137c1b37642dfc507337d93319f8fd247bacfcb62d495e4
3
+ metadata.gz: 323fb5218f6098e38b7aedb951f8ff7c6aa93e891a9bbe77ffecf4ef2b0385ad
4
+ data.tar.gz: '085e4f77356020cb7bbbf8b45332d635ef915c80d109fe5101b81ae101446874'
5
5
  SHA512:
6
- metadata.gz: a8def8a344f419a00722f2e0d2c481603fa940e02dab468a8a28251c273f1c8b0d06310cfd496abcad82d331f99efeb4f5c57f0c25462ddb2ca50da2b83008d0
7
- data.tar.gz: bf23b9b0c8bc4cba10a2f944889210baa0378008779dd4ac935a85d42826c83e12aad1f84c29904fcf96aa0e3c2545baa32cfb7cb2a7a84bbf3c48d67cdb10a7
6
+ metadata.gz: 86eb1f2f02fea68c10bfa428e4e415931378ca6d696b041abeb995590f14488e01aa90a19832e697c4faff6dca97b9522d7ac5e3ca734a004ff3b2f7c821c1c3
7
+ data.tar.gz: 76c486d493078154cafe97ab96870b856cbd9813a18fc6b353210c1aed82a11df7ae039fcef291c4806c505788acef4d85fa1f3199e324cbab293405c653743d
@@ -41,16 +41,6 @@ module KBuilder
41
41
 
42
42
  @target_folders = configuration.target_folders.clone
43
43
  @template_folders = configuration.template_folders.clone
44
-
45
- define_builder_setter_methods
46
- end
47
-
48
- # Return an array of symbols to represent the fluent
49
- # setter methods that you want on your builder.
50
- #
51
- # Abstract method
52
- def builder_setter_methods
53
- []
54
44
  end
55
45
 
56
46
  # @return [Hash/StrongType] Returns data object, can be a hash
@@ -254,63 +244,5 @@ module KBuilder
254
244
  system(build_command)
255
245
  end
256
246
  alias rc run_command
257
-
258
- # TODO
259
- # Support Nesting
260
- # Support Generation fo the following
261
- # - fluent set_
262
- # - Support setter (non-fluent)
263
- # - Support getter (non-fluent)
264
-
265
- # # builds a nested structure by either builder block or hash
266
- # # @param data_structure [type=DataStructure]
267
- # # @param builder [type=Builder]
268
- # # @param attributes [type=Hash|DataStructure instance]
269
- # # @param &block
270
- # #
271
- # # @return [type=Hash]
272
- # def build_nested(data_structure, builder, attributes = {}, &block)
273
- # if block_given?
274
- # builder.build(&block).to_h
275
- # else
276
- # build_hash(data_structure, attributes)
277
- # end
278
- # end
279
-
280
- private
281
-
282
- # #
283
- # # @param data_structure [type=DataStructure]
284
- # # @param attributes [type=Hash, DataStructure]
285
- # #
286
- # # @return [type=Hash]
287
- # def build_hash(data_structure, attributes)
288
- # if attributes.is_a?(data_structure)
289
- # attributes.to_h
290
- # else
291
- # data_structure.new(attributes).to_h
292
- # end
293
- # end
294
-
295
- # Defines all of the necessary builder setter methods
296
- #
297
- # @return [Builder] Returns the builder via fluent interface
298
- def define_builder_setter_methods
299
- builder_setter_methods.each { |method| define_builder_method(method) }
300
- self
301
- end
302
-
303
- # Defines a method using the convention set_[method_name]
304
- #
305
- # Convention: Setter methods (are Fluent) and use the prefix set_
306
- # Getter methods (are NOT fluent) and return the stored value
307
- #
308
- # @return [Builder] Returns the builder via fluent interface
309
- def define_builder_method(method_name)
310
- self.class.send(:define_method, "set_#{method_name}") do |value|
311
- @hash[method_name.to_s] = value
312
- self
313
- end
314
- end
315
247
  end
316
248
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KBuilder
4
- VERSION = '0.0.39'
4
+ VERSION = '0.0.40'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: k_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.39
4
+ version: 0.0.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys