Class: Demon

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 = 200, strength = 12, experience = 300) ⇒ Demon

Returns a new instance of Demon.



93
94
95
96
97
98
# File 'lib/monsters.rb', line 93

def initialize (name = self.class, life = 200, strength = 12, experience = 300)
	@name = name
	@life = life
	@strength = strength
	@experience = experience
end

Instance Attribute Details

#experienceObject

Returns the value of attribute experience.



91
92
93
# File 'lib/monsters.rb', line 91

def experience
  @experience
end

#lifeObject

Returns the value of attribute life.



91
92
93
# File 'lib/monsters.rb', line 91

def life
  @life
end

#nameObject

Returns the value of attribute name.



91
92
93
# File 'lib/monsters.rb', line 91

def name
  @name
end

#strengthObject

Returns the value of attribute strength.



91
92
93
# File 'lib/monsters.rb', line 91

def strength
  @strength
end