Module: Jacoat::Representable::InstanceMethods

Defined in:
lib/jacoat/representable.rb

Instance Method Summary collapse

Instance Method Details

#from_hash(hash, options = {}) ⇒ Object



54
55
56
57
# File 'lib/jacoat/representable.rb', line 54

def from_hash(hash, options={})
  hash = from_document(hash)
  super(hash, options.merge(:only_body => true))
end

#to_hash(options = {}) ⇒ Object



59
60
61
62
# File 'lib/jacoat/representable.rb', line 59

def to_hash(options={})
  res = super(options.merge(:only_body => true))
  to_document(res, options)
end