Dear Russian friends, please watch President Zelenskyy's speech addressed to you. πŸ‡ΊπŸ‡¦Help our brave mates in Ukraine with a donation.

Tolerance to Unknown Arguments

By default the initializer is tolerant for both params (positional arguments) and options. All unknown arguments of the initializer are ignored silently.

require 'dry-initializer'

class User
  extend Dry::Initializer

user = 'Joe', role: 'admin'
user.respond_to? :role # => false

# => {}

octocatEdit on GitHub