lib/demiurge/container.rb
# This makes sure the given item name is listed in the container's
# contents. It does *not* make sure that the item currently
# exists, or that its position is set to this container.
#
# @see #move_item_inside
# @see #ensure_does_not_contain
# @param item_name [String] The item name to ensure is listed in the container
# @return [void]
# @since 0.0.1
This makes sure the given item name is listed in the container's
contents. It does *not* make sure that the item currently
exists, or that its position is set to this container.
This makes sure the given item name is listed in the container ' s contents . It does * not * make sure that the item currently exists or that its position is set to this container .
def ensure_contains(item_name)
      raise("Pass only item names to ensure_contains!") unless item_name.is_a?(String)
      @state["contents"] |= [item_name]
      nil
    end
def ensure_contains ( item_name ) raise ( "Pass only item names to ensure_contains!" ) unless item_name . is_a? ( String ) @state [ "contents" ] |= [ item_name ] nil end
This makes sure the given item name is listed in the container's
contents.
This makes sure the given item name is listed in the container ' s contents .
None
void
item_name
The item name to ensure is listed in the container
The item name to ensure is listed in the container
see
None
see
None
since
None