Class: Undead

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 = 250, strength = 12, experience = 350) ⇒ Undead

Returns a new instance of Undead.



27
28
29
30
31
32
# File 'lib/monsters.rb', line 27

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

Instance Attribute Details

#experienceObject

Returns the value of attribute experience.



25
26
27
# File 'lib/monsters.rb', line 25

def experience
  @experience
end

#lifeObject

Returns the value of attribute life.



25
26
27
# File 'lib/monsters.rb', line 25

def life
  @life
end

#nameObject

Returns the value of attribute name.



25
26
27
# File 'lib/monsters.rb', line 25

def name
  @name
end

#strengthObject

Returns the value of attribute strength.



25
26
27
# File 'lib/monsters.rb', line 25

def strength
  @strength
end