Method: Representable::Declarative#hash

Defined in:
lib/representable/declarative.rb

#hash(name = nil, options = {}, &block) ⇒ Object



13
14
15
16
17
18
# File 'lib/representable/declarative.rb', line 13

def hash(name=nil, options={}, &block)
  return super() unless name  # allow Object.hash.

  options[:hash] = true
  property(name, options, &block)
end