Class: Inventory

Inherits:
Object
  • Object
show all
Defined in:
models.rb

Class Method Summary (collapse)

Class Method Details

+ (Array) list

Inventory items

Examples:

Using inventory list in script.

echo Inventory::list
=> ["a lumpy bundle", "an origami-paper envelope", "a heavy burlap haversack",
    "a simple belt knife", "a sturdy troll-skin herb pouch"]

Returns:

  • (Array)

    inventory item list



51
52
53
54
# File 'models.rb', line 51

def self.list
  $_api_socket.puts "GET INVENTORY\n"
  $_api_socket.gets('\0').chomp('\0').to_s.split("\n")
end