Module: RTM::AR::IO::TOYAML::Variant
- Defined in:
- lib/rtm/activerecord/io/to_yaml.rb
Instance Method Summary collapse
Instance Method Details
#to_yaml(*a) ⇒ Object
124 125 126 |
# File 'lib/rtm/activerecord/io/to_yaml.rb', line 124 def to_yaml(*a) to_yaml_hash.to_yaml(*a) end |
#to_yaml_hash(*a) ⇒ Object
116 117 118 119 120 121 122 123 |
# File 'lib/rtm/activerecord/io/to_yaml.rb', line 116 def to_yaml_hash(*a) y={} y['reifier'] = reifier.to_yaml_ref if reifier y['item_identifiers'] = item_identifiers.map{|i| i.reference} unless item_identifiers.empty? y['value'] = value if value y['scope'] = scope.map{|i| i.to_yaml_hash} unless scope.empty? y end |