Class: CoopAl::Monster
- Inherits:
-
Object
- Object
- CoopAl::Monster
- Defined in:
- lib/coop_al/monster.rb
Overview
Monster
Instance Attribute Summary collapse
-
#encounter ⇒ Object
readonly
Returns the value of attribute encounter.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#loot ⇒ Object
readonly
Returns the value of attribute loot.
-
#xp ⇒ Object
readonly
Returns the value of attribute xp.
Instance Method Summary collapse
-
#initialize(id, xp, loot, encounter) ⇒ Monster
constructor
A new instance of Monster.
- #to_s ⇒ Object
Constructor Details
#initialize(id, xp, loot, encounter) ⇒ Monster
Returns a new instance of Monster.
8 9 10 11 12 13 |
# File 'lib/coop_al/monster.rb', line 8 def initialize(id, xp, loot, encounter) @id = id @xp = xp @loot = loot @encounter = encounter end |
Instance Attribute Details
#encounter ⇒ Object (readonly)
Returns the value of attribute encounter.
6 7 8 |
# File 'lib/coop_al/monster.rb', line 6 def encounter @encounter end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/coop_al/monster.rb', line 6 def id @id end |
#loot ⇒ Object (readonly)
Returns the value of attribute loot.
6 7 8 |
# File 'lib/coop_al/monster.rb', line 6 def loot @loot end |
#xp ⇒ Object (readonly)
Returns the value of attribute xp.
6 7 8 |
# File 'lib/coop_al/monster.rb', line 6 def xp @xp end |
Instance Method Details
#to_s ⇒ Object
15 16 17 |
# File 'lib/coop_al/monster.rb', line 15 def to_s @id.to_s end |