lib/representable.rb in representable-1.8.2 vs lib/representable.rb in representable-1.8.3
- old
+ new
@@ -107,14 +107,14 @@
def collection(name, options={}, &block)
options[:collection] = true # FIXME: don't override original.
property(name, options, &block)
end
- def hash(name=nil, options={})
+ def hash(name=nil, options={}, &block)
return super() unless name # allow Object.hash.
options[:hash] = true
- property(name, options)
+ property(name, options, &block)
end
private
def definition_class
Definition