Class: Undead
- Inherits:
-
Object
- Object
- Undead
- Defined in:
- lib/monsters.rb
Instance Attribute Summary collapse
-
#experience ⇒ Object
Returns the value of attribute experience.
-
#life ⇒ Object
Returns the value of attribute life.
-
#name ⇒ Object
Returns the value of attribute name.
-
#strength ⇒ Object
Returns the value of attribute strength.
Instance Method Summary collapse
-
#initialize(name = self.class, life = 250, strength = 12, experience = 350) ⇒ Undead
constructor
A new instance of Undead.
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
#experience ⇒ Object
Returns the value of attribute experience.
25 26 27 |
# File 'lib/monsters.rb', line 25 def experience @experience end |
#life ⇒ Object
Returns the value of attribute life.
25 26 27 |
# File 'lib/monsters.rb', line 25 def life @life end |
#name ⇒ Object
Returns the value of attribute name.
25 26 27 |
# File 'lib/monsters.rb', line 25 def name @name end |
#strength ⇒ Object
Returns the value of attribute strength.
25 26 27 |
# File 'lib/monsters.rb', line 25 def strength @strength end |