lib/dry/initializer/config.rb in dry-initializer-3.0.1 vs lib/dry/initializer/config.rb in dry-initializer-3.0.2
- old
+ new
@@ -56,21 +56,21 @@
# @option opts [Boolean] :optional
# @option opts [Symbol] :as
# @option opts [true, false, :protected, :public, :private] :reader
# @return [self] itself
def param(name, type = nil, **opts, &block)
- add_definition(false, name, type, block, opts)
+ add_definition(false, name, type, block, **opts)
end
# Adds or redefines an option of [#dry_initializer]
#
# @param (see #param)
# @option (see #param)
# @return (see #param)
#
def option(name, type = nil, **opts, &block)
- add_definition(true, name, type, block, opts)
+ add_definition(true, name, type, block, **opts)
end
# The hash of public attributes for an instance of the [#extended_class]
# @param [Dry::Initializer::Instance] instance
# @return [Hash<Symbol, Object>]
@@ -140,14 +140,14 @@
option: option,
null: null,
source: name,
type: type,
block: block,
- **opts,
+ **opts
}
- options = Dispatchers.call(opts)
- definition = Definition.new(options)
+ options = Dispatchers.call(**opts)
+ definition = Definition.new(**options)
definitions[definition.source] = definition
finalize
mixin.class_eval definition.code
end
# rubocop: enable Metrics/MethodLength