class Gemwarrior::Entity

Attributes

consumable[RW]
describe[R]
describe_detailed[R]
description[RW]
display_shopping_cart[R]
equippable[RW]
equipped[RW]
name[RW]
name_display[RW]
number_of_uses[RW]
takeable[RW]
talkable[RW]
useable[RW]
useable_battle[RW]
used[RW]
used_again[RW]

Public Class Methods

new() click to toggle source
# File lib/gemwarrior/entities/entity.rb, line 28
def initialize
  self.name           = 'entity'
  self.name_display   = Formatting::upstyle(name)
  self.description    = 'An entity.'
  self.useable        = true
  self.useable_battle = false
  self.talkable       = false
  self.consumable     = false
  self.takeable       = true
  self.equippable     = false
  self.equipped       = false
  self.used           = false
  self.used_again     = false
  self.number_of_uses = nil
end

Public Instance Methods

puts(s = '', width = GameOptions.data['wrap_width']) click to toggle source
Calls superclass method
# File lib/gemwarrior/entities/entity.rb, line 73
def puts(s = '', width = GameOptions.data['wrap_width'])
  super s.gsub(/(.{1,#{width}})(\s+|\Z)/, "\\1\n") unless s.nil?
end
use(world) click to toggle source
# File lib/gemwarrior/entities/entity.rb, line 44
def use(world)
  'That does not appear to be useable.'
end