lib/catissue/domain/container.rb
def add(storable, *coordinate)
      validate_type(storable)
      loc = create_location(coordinate)
      pos = storable.position || storable.position_class.new
      pos.location = loc
      pos.occupant = storable
      pos.holder = self
      logger.debug { "Added #{storable.qp} to #{qp} at #{loc.coordinate}." }
      update_full_flag
      self
    end
def add(storable, *coordinate)
      validate_type(storable)
      loc = create_location(coordinate)
      pos = storable.position || storable.position_class.new
      pos.location = loc
      pos.occupant = storable
      pos.holder = self
      logger.debug { "Added #{storable.qp} to #{qp} at #{loc.coordinate}." }
      update_full_flag
      self
    end
def add ( storable , * coordinate ) validate_type ( storable ) loc = create_location ( coordinate ) pos = storable . position || storable . position_class . new pos . location = loc pos . occupant = storable pos . holder = self logger . debug { "Added #{storable.qp} to #{qp} at #{loc.coordinate}." } update_full_flag self end
Moves the given Storable from its current Position, if any, to this Container at the optional
 coordinate. The default coordinate is the first available slot within this Container.
 The storable Storable position is updated to reflect the new location. Returns self.

 @param [Storable] storable the item to add
 @param [CaRuby::Coordinate, <Integer>] coordinate the x-y coordinate to place the item
 @raise [IndexError] if this Container is full
 @raise [IndexError] if the row and column are given but exceed the Container bounds
Moves the given Storable from its current Position if any to this Container at the optional coordinate . The default coordinate is the first available slot within this Container . The storable Storable position is updated to reflect the new location . Returns self .