Class: Degica::InventoryCollection

Inherits:
ObjectCollection show all
Defined in:
lib/degica/collections/inventory_collection.rb

Instance Method Summary collapse

Methods inherited from ObjectCollection

#actions

Methods inherited from Collection

#<<, #actions, #initialize

Methods included from Actionable

#actions, #do

Constructor Details

This class inherits a constructor from Degica::Collection

Instance Method Details

#describeObject



7
8
9
10
11
12
13
# File 'lib/degica/collections/inventory_collection.rb', line 7

def describe
  if empty?
    "You have no items in your inventory."
  else
    "[" + map(&:name).join(', ') + "]"
  end
end

#promptObject



3
4
5
# File 'lib/degica/collections/inventory_collection.rb', line 3

def prompt
  "inventory"
end