Method: Representable::ObjectDeserializer#call
- Defined in:
- lib/representable/deserializer.rb
#call(fragment, *args) ⇒ Object
FIXME: args is always i.
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/representable/deserializer.rb', line 26 def call(fragment, *args) # FIXME: args is always i. return fragment unless @binding.typed? # customize with :extend. this is not really straight-forward. # what if create_object is responsible for providing the deserialize-to object? object = @binding.create_object(fragment, *args) # customize with :instance and :class. # DISCUSS: what parts should be in this class, what in Binding? representable = prepare(object) # customize with :prepare and :extend. deserialize(representable, fragment, @binding.) # deactivate-able via :representable => false. end |