dry-initializer
dry-initializer copied to clipboard
DSL for building class initializer with params and options.
I guess as: is meant (According to the instances in the example)
## Describe the bug the :default keyword supports an "instance_exec" type of evaluation whereby `default: -> { foo + bar }' reference the object in questions' `foo` and ` bar`...
This PR fixes false negatives for default values wrapped into lambdas and procs. Source of the problem: ```ruby la = ->(a,b,*c) {} pr = proc {|a,b,*c|} lambda.arity #=> -3 proc.arity...
### default behavior remains unchanged Unknown params and options are ignored but stored in their own attr_reader ```ruby class Test::Foo extend Dry::Initializer param :foo param :bar, optional: true end foo...
Hi, thank you for this useful gem! I have one question about the design choice of how to generate the constructor of the object. https://github.com/dry-rb/dry-initializer/blob/3167b5aee1d093886fe02448901db5a851f74d7b/lib/dry/initializer/builders/signature.rb#L8-L10 Why is the '*' included...
This PR fixes the `callable!` check which was not raising when setting `default: false`, even though it does when setting `default: true`. ⚠️ This is a breaking change! As it...