Class: Demon
- Inherits:
-
Object
- Object
- Demon
- 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 = 200, strength = 12, experience = 300) ⇒ Demon
constructor
A new instance of Demon.
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
#experience ⇒ Object
Returns the value of attribute experience.
91 92 93 |
# File 'lib/monsters.rb', line 91 def experience @experience end |
#life ⇒ Object
Returns the value of attribute life.
91 92 93 |
# File 'lib/monsters.rb', line 91 def life @life end |
#name ⇒ Object
Returns the value of attribute name.
91 92 93 |
# File 'lib/monsters.rb', line 91 def name @name end |
#strength ⇒ Object
Returns the value of attribute strength.
91 92 93 |
# File 'lib/monsters.rb', line 91 def strength @strength end |