libraries/AssociationManagement.rb
# For the given associatable target object, appends or concatenates the given datum_to_append to the association
# at `key` for that object
#
# @param association_map [AssocioationMap]  an AssociationMap that will have its associations appended to.
# @param key [String/Symbol]  The association key which maps to an appendable object
# @param datum_to_append [Serializable Object]  the element to append to the list at the value for the given key
# @param opts [Hash]  additional options
# @option coord [Tuple array]  coordinate of target part, if association target is a collection
For the given associatable target object, appends or concatenates the given datum_to_append to the association
at `key` for that object
For the given associatable target object appends or concatenates the given datum_to_append to the association at ` key ` for that object
def append_to_association(association_map, key, datum_to_append, opts = {})
      if opts[:coord] 
        association_map.putrc(opts[:coord][0], opts[:coord][1], key, []) if association_map.getrc(opts[:coord][0], opts[:coord][1], key).nil?
        association_map.getrc(opts[:coord][0], opts[:coord][1], key) <<  datum_to_append
      else
        association_map.put(key, []) if association_map.get(key).nil?
        association_map.get(key) << datum_to_append
      end
    end
def append_to_association ( association_map , key , datum_to_append , opts = { } ) if opts [ :coord ] association_map . putrc ( opts [ :coord ] [ 0 ] , opts [ :coord ] [ 1 ] , key , [ ] ) if association_map . getrc ( opts [ :coord ] [ 0 ] , opts [ :coord ] [ 1 ] , key ) . nil? association_map . getrc ( opts [ :coord ] [ 0 ] , opts [ :coord ] [ 1 ] , key ) << datum_to_append else association_map . put ( key , [ ] ) if association_map . get ( key ) . nil? association_map . get ( key ) << datum_to_append end end
For the given associatable target object, appends or concatenates the given datum_to_append to the association
at `key` for that object
For the given associatable target object appends or concatenates the given datum_to_append to the association at ` key ` for that object
# we will be interacting with the associations of a part of a collection if coord is specified
association_map
an AssociationMap that will have its associations appended to.
an AssociationMap that will have its associations appended to .
key
The association key which maps to an appendable object
The association key which maps to an appendable object
datum_to_append
the element to append to the list at the value for the given key
the element to append to the list at the value for the given key
opts
None
coord
coordinate of target part, if association target is a collection
coordinate of target part if association target is a collection