Method: Representable::HashMethods#update_properties_from

Defined in:
lib/representable/hash_methods.rb

#update_properties_from(doc, options, format) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/representable/hash_methods.rb', line 10

def update_properties_from(doc, options, format)
  hash  = filter_keys_for!(doc, options)
  bin   = representable_map(options, format).first

  value = Collect::Hash[*bin.default_parse_fragment_functions].(hash, fragment: hash, document: doc, binding: bin, represented: represented, options: options, decorator: self)

  represented.replace(value)
end