Class: Gemwarrior::Entity

Inherits:
Object
  • Object
show all
Defined in:
lib/gemwarrior/entities/entity.rb

Direct Known Subclasses

Creature, Item, Location

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



6
7
8
# File 'lib/gemwarrior/entities/entity.rb', line 6

def description
  @description
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/gemwarrior/entities/entity.rb', line 6

def name
  @name
end

Instance Method Details

#statusObject



9
10
11
12
# File 'lib/gemwarrior/entities/entity.rb', line 9

def status
  status_text =  name.ljust(26).upcase.colorize(:green)
  status_text << "#{description}\n".colorize(:white)
end