Tolerance to Unknown Options

By default the initializer is strict for params (positional arguments), expecting them to be defined explicitly.

require 'dry-initializer'

class User
  extend Dry::Initializer

user = 'Joe' # raises ArgumentError

At the same time it is tolerant to unknown options. All unknown options are accepted, but ignored:

# It accepts undefined options...
user = name: 'Joe'

# ...but ignores them
user.respond_to? :name # => false

octocatEdit on GitHub