class Core::Game::Equipment

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/game/equipment.rb, line 13
def initialize
  super
end

Public Instance Methods

at(loc) click to toggle source
# File lib/game/equipment.rb, line 30
def at(loc)
  return self[loc]
end
equip(item, location, inventory) click to toggle source
# File lib/game/equipment.rb, line 16
def equip(item, location, inventory)
  if @@locations.include?(location)
    inventory.remove(item)
    ret = self[location]
    inventory.add(ret) if ret
    self.store(location, item)
    return ret
  end
end
remove_at(location) click to toggle source
# File lib/game/equipment.rb, line 25
def remove_at(location)
  ret = self[location]
  self[location] = nil
  return ret
end