Open mustmodify opened 6 years ago
class Fu < Valuable has_value :bar end >> f = Fu.new(bar: 6) >> f.attributes['bar'] => nil >> f.attributes[:bar] => 6
Well, in order to get this to work, we'd need something like HashWithIndifferentAccess. Alternately, we could make this work for JUST attributes but not, for example, f.attributes['fu']['bar']. So ... 🤷♂