Module: RTM::AR::IO::TOYAML::AssociationRole
- Defined in:
- lib/rtm/activerecord/io/to_yaml.rb
Instance Method Summary collapse
Instance Method Details
#to_yaml(*a) ⇒ Object
110 111 112 |
# File 'lib/rtm/activerecord/io/to_yaml.rb', line 110 def to_yaml(*a) to_yaml_hash.to_yaml(*a) end |
#to_yaml_hash(*a) ⇒ Object
102 103 104 105 106 107 108 109 |
# File 'lib/rtm/activerecord/io/to_yaml.rb', line 102 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['player'] = player.to_yaml_ref if player y['type'] = type.to_yaml_ref if type y end |