Class: Human

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 = 70, strength = 4, experience = 30) ⇒ Human

Returns a new instance of Human.



15
16
17
18
19
20
# File 'lib/monsters.rb', line 15

def initialize(name = self.class, life = 70, strength = 4, experience = 30)
	@name = name
	@life = life
	@strength = strength
	@experience = experience
end

Instance Attribute Details

#experienceObject

Returns the value of attribute experience.



13
14
15
# File 'lib/monsters.rb', line 13

def experience
  @experience
end

#lifeObject

Returns the value of attribute life.



13
14
15
# File 'lib/monsters.rb', line 13

def life
  @life
end

#nameObject

Returns the value of attribute name.



13
14
15
# File 'lib/monsters.rb', line 13

def name
  @name
end

#strengthObject

Returns the value of attribute strength.



13
14
15
# File 'lib/monsters.rb', line 13

def strength
  @strength
end