libraries/AssociationManagement.rb
def serialize_as_simple_tag(item, coord, additional_info)
      info = if item.collection? && coord
               { id: item.id, row: coord[0], column: coord[1] }
             elsif (item.is_a? Item) || (item.is_a? Collection)
               { id: item.id }
             else
               raise 'Argument is neither a part nor an item'
             end
      info.merge!(additional_info) unless additional_info.nil?
      info
    end
# Given an item, or a part of a collection, serializes it into a simple tag which can be used to retrieve it.
#
# @param item [Item/FieldValue]  can be either an Item, or
#                         an i/o object corresponding to a part of a collection, which can be thought of
#                         as constituting a 'sub item'
Given an item, or a part of a collection, serializes it into a simple tag which can be used to retrieve it.
Given an item or a part of a collection serializes it into a simple tag which can be used to retrieve it .
def serialize_as_simple_tag(item, coord, additional_info)
      info = if item.collection? && coord
               { id: item.id, row: coord[0], column: coord[1] }
             elsif (item.is_a? Item) || (item.is_a? Collection)
               { id: item.id }
             else
               raise 'Argument is neither a part nor an item'
             end
      info.merge!(additional_info) unless additional_info.nil?
      info
    end
def serialize_as_simple_tag ( item , coord , additional_info ) info = if item . collection? && coord { id : item . id , row : coord [ 0 ] , column : coord [ 1 ] } elsif ( item . is_a? Item ) || ( item . is_a? Collection ) { id : item . id } else raise 'Argument is neither a part nor an item' end info . merge! ( additional_info ) unless additional_info . nil? info end
Given an item, or a part of a collection, serializes it into a simple tag which can be used to retrieve it.
Given an item or a part of a collection serializes it into a simple tag which can be used to retrieve it .
item
can be either an Item, or an i/o object corresponding to a part of a collection, which can be thought of as constituting a 'sub item'
can be either an Item or an i / o object corresponding to a part of a collection which can be thought of as constituting a ' sub item '
coord
additional_info