Open sambostock opened 7 years ago
This is indeed specified behaviour: https://github.com/t6d/smart_properties/blob/master/spec/required_values_spec.rb. That said, I'm currently working towards a 2.0
release and will investigate whether making the behaviour configurable is an option.
Given a property defined as follows:
The following code works, as expected:
However, explicitly providing the
bar
property asnil
fails:Is this desired behaviour? It would seem logical that explicitly passing in
nil
should fall through to thedefault
, which would satisfy therequired
constraint.