lib/catissue/domain/storage_container.rb
def add(storable, *coordinate)
      return add_local(storable, *coordinate) unless coordinate.empty?
      add_to_existing_container(storable) or add_to_new_subcontainer(storable) or out_of_bounds(storable)
      self
    end
def add(storable, *coordinate)
      return add_local(storable, *coordinate) unless coordinate.empty?
      add_to_existing_container(storable) or add_to_new_subcontainer(storable) or out_of_bounds(storable)
      self
    end
def add ( storable , * coordinate ) return add_local ( storable , coordinate ) unless coordinate . empty? add_to_existing_container ( storable ) or add_to_new_subcontainer ( storable ) or out_of_bounds ( storable ) self end
Adds the given storable to this container. If the storable has a current position, then
 the storable is moved from that position to this container. The new position is given
 by the given coordinate, if given to this method.

 The default coordinate is the first available slot within this Container.
 If this container cannot hold the storable type, then the storable is added to a
 subcontainer which can hold the storable type.

 @example
   rack << box #=> places the tissue box on the rack
   freezer << box #=> places the tissue box on a rack in the freezer
   freezer << specimen #=> places the specimen in the first available box in the freezer

 @param [Storable] the item to add
 @param [Coordinate, <Integer>] the storage location (default is first available location)
 @return [StorageContainer] self
 @raise [IndexError] if this Container is full
 @raise [IndexError] if the row and column are given but exceed the Container bounds
Adds the given storable to this container . If the storable has a current position then the storable is moved from that position to this container . The new position is given by the given coordinate if given to this method .