Class: Representable::JSON::ObjectBinding
- Defined in:
- lib/representable/bindings/json_bindings.rb
Overview
Represents a tag with object binding.
Instance Attribute Summary
Attributes inherited from Binding
Instance Method Summary collapse
Methods inherited from Binding
Constructor Details
This class inherits a constructor from Representable::JSON::Binding
Instance Method Details
#update_json(hash, value) ⇒ Object
48 49 50 51 52 53 54 |
# File 'lib/representable/bindings/json_bindings.rb', line 48 def update_json(hash, value) if array? hash.merge! ({accessor => value.collect {|v| v.to_hash(:wrap => false)}}) # hier name=> wech. else hash.merge! value.to_hash end end |