Class: Imp

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 = 5, experience = 80) ⇒ Imp

Returns a new instance of Imp.



49
50
51
52
53
54
# File 'lib/monsters.rb', line 49

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

Instance Attribute Details

#experienceObject

Returns the value of attribute experience.



47
48
49
# File 'lib/monsters.rb', line 47

def experience
  @experience
end

#lifeObject

Returns the value of attribute life.



47
48
49
# File 'lib/monsters.rb', line 47

def life
  @life
end

#nameObject

Returns the value of attribute name.



47
48
49
# File 'lib/monsters.rb', line 47

def name
  @name
end

#strengthObject

Returns the value of attribute strength.



47
48
49
# File 'lib/monsters.rb', line 47

def strength
  @strength
end