Class: Representable::YAML::Binding::Collection
- Inherits:
-
Representable::YAML::Binding
- Object
- Binding
- Hash::Binding
- Representable::YAML::Binding
- Representable::YAML::Binding::Collection
- Includes:
- Binding::Collection
- Defined in:
- lib/representable/yaml/binding.rb
Instance Attribute Summary
Attributes inherited from Binding
#array, #cached_representer, #getter, #has_default, #name, #representable, #represented, #setter, #skip_filters, #typed, #user_options
Instance Method Summary collapse
Methods inherited from Representable::YAML::Binding
build_for, #deserialize_method, #serialize_method, #write, #write_scalar
Methods inherited from Hash::Binding
build_for, #deserialize_method, #read, #serialize_method, #write
Methods inherited from Binding
#[], #as, build, #compile_fragment, #default_for, #evaluate_option, #get, #initialize, #parse_filter, #read_fragment, #render_filter, #render_fragment, #representer_module_for, #set, #skipable_empty_value?, #uncompile_fragment, #update!, #write_fragment
Methods included from Binding::Factories
#deserializer, #deserializer_class, #populator, #populator_class, #serializer, #serializer_class
Constructor Details
This class inherits a constructor from Representable::Binding
Instance Method Details
#node_for(fragments) ⇒ Object
39 40 41 42 43 44 |
# File 'lib/representable/yaml/binding.rb', line 39 def node_for(fragments) Psych::Nodes::Sequence.new.tap do |seq| seq.style = Psych::Nodes::Sequence::FLOW if self[:style] == :flow fragments.each { |frag| seq.children << write_scalar(frag) } end end |