Class: Representable::XML::ContentBinding
- Inherits:
-
PropertyBinding
- Object
- Binding
- PropertyBinding
- Representable::XML::ContentBinding
- Defined in:
- lib/representable/bindings/xml_bindings.rb
Overview
Represents tag content.
Instance Attribute Summary
Attributes inherited from Binding
Instance Method Summary collapse
Methods inherited from PropertyBinding
build_for, #deserialize_from, #deserialize_method, #serialize_method, #serialize_node
Methods included from Binding::Object
#create_object, #deserialize, #serialize
Methods inherited from Binding
#as, build, #compile_fragment, #get, #initialize, #parse_filter, #read_fragment, #read_fragment_for, #render_filter, #representer_module_for, #set, #uncompile_fragment, #write_fragment, #write_fragment_for
Constructor Details
This class inherits a constructor from Representable::Binding
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Representable::Binding
Instance Method Details
#read(node) ⇒ Object
159 160 161 |
# File 'lib/representable/bindings/xml_bindings.rb', line 159 def read(node) node.content end |
#serialize_for(value, parent) ⇒ Object
163 164 165 |
# File 'lib/representable/bindings/xml_bindings.rb', line 163 def serialize_for(value, parent) parent.content = serialize(value.to_s) end |
#write(parent, value) ⇒ Object
167 168 169 |
# File 'lib/representable/bindings/xml_bindings.rb', line 167 def write(parent, value) serialize_for(value, parent) end |