Class: Orc

Inherits:
Object
  • Object
show all
Defined in:
lib/monsters.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = self.class, life = 80, strength = 6, experience = 100) ⇒ Orc

Returns a new instance of Orc.



60
61
62
63
64
65
# File 'lib/monsters.rb', line 60

def initialize(name = self.class, life = 80, strength = 6, experience = 100)
	@name = name
	@life = life
	@strength = strength
	@experience = experience
end

Instance Attribute Details

#experienceObject

Returns the value of attribute experience.



58
59
60
# File 'lib/monsters.rb', line 58

def experience
  @experience
end

#lifeObject

Returns the value of attribute life.



58
59
60
# File 'lib/monsters.rb', line 58

def life
  @life
end

#nameObject

Returns the value of attribute name.



58
59
60
# File 'lib/monsters.rb', line 58

def name
  @name
end

#strengthObject

Returns the value of attribute strength.



58
59
60
# File 'lib/monsters.rb', line 58

def strength
  @strength
end