lib/dry/initializer/builders/initializer.rb in dry-initializer-3.0.2 vs lib/dry/initializer/builders/initializer.rb in dry-initializer-3.0.3

- old
+ new

@@ -1,10 +1,10 @@ module Dry::Initializer::Builders # @private class Initializer - require_relative "signature" - require_relative "attribute" + require_relative 'signature' + require_relative 'attribute' def self.[](config) new(config).call end @@ -28,34 +28,30 @@ end_line ] end def undef_line - "undef :__dry_initializer_initialize__" \ - " if private_method_defined? :__dry_initializer_initialize__" + 'undef :__dry_initializer_initialize__' \ + ' if private_method_defined? :__dry_initializer_initialize__' end def define_line "private def __dry_initializer_initialize__(#{Signature[@config]})" end def params_lines @definitions.reject(&:option) - .flat_map { |item| Attribute[item] } - .map { |line| " " << line } + .flat_map { |item| Attribute[item] } + .map { |line| ' ' << line } end def options_lines @definitions.select(&:option) - .flat_map { |item| Attribute[item] } - .map { |line| " " << line } + .flat_map { |item| Attribute[item] } + .map { |line| ' ' << line } end def end_line - "end" - end - - def private_line - "private :__dry_initializer_initialize__" + 'end' end end end