lib/active_house/modeling.rb in active_house-0.2.2 vs lib/active_house/modeling.rb in active_house-0.3.0

- old
+ new

@@ -24,9 +24,11 @@ def get_attribute(name) @_attributes[name] end def set_attribute(name, value) + opts = _attribute_opts.fetch(name, {}) + value = opts[:cast].call(value) if opts[:cast] @_attributes[name] = value end end class_methods do