Class: Monster
- Inherits:
-
Object
- Object
- Monster
- Defined in:
- lib/add_monster.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, location, description) ⇒ Monster
constructor
A new instance of Monster.
Constructor Details
#initialize(name, location, description) ⇒ Monster
Returns a new instance of Monster.
4 5 6 7 8 |
# File 'lib/add_monster.rb', line 4 def initialize(name, location, description) @name = name @location = location @description = description end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
3 4 5 |
# File 'lib/add_monster.rb', line 3 def description @description end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
3 4 5 |
# File 'lib/add_monster.rb', line 3 def location @location end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/add_monster.rb', line 3 def name @name end |