Class: Representable::XML::Binding::Content

Inherits:
Representable::XML::Binding show all
Defined in:
lib/representable/xml/binding.rb

Overview

Represents tag content.

Instance Attribute Summary

Attributes inherited from Binding

#cached_representer, #getter, #name, #setter

Instance Method Summary collapse

Methods inherited from Representable::XML::Binding

build_for, #deserialize_from, #deserialize_method, #serialize_method, #serialize_node

Methods inherited from Binding

#[], build, #default_for, #initialize, #skipable_empty_value?

Methods included from Binding::Factories

#collect_for, #default_parse_fragment_functions, #default_parse_init_functions, #default_post_functions, #default_render_fragment_functions, #default_render_init_functions, #parse_functions, #pipeline_for, #render_functions

Methods included from Binding::EvaluateOption

#evaluate_option

Methods included from Binding::Deprecatable

#compile_fragment, #uncompile_fragment

Constructor Details

This class inherits a constructor from Representable::Binding

Instance Method Details

#read(node, as) ⇒ Object



157
158
159
# File 'lib/representable/xml/binding.rb', line 157

def read(node, as)
  node.content
end

#serialize_for(value, parent) ⇒ Object



161
162
163
# File 'lib/representable/xml/binding.rb', line 161

def serialize_for(value, parent)
  parent.content = value.to_s
end

#write(parent, value, as) ⇒ Object



165
166
167
# File 'lib/representable/xml/binding.rb', line 165

def write(parent, value, as)
  serialize_for(value, parent)
end