Class: Monster

Inherits:
Object
  • Object
show all
Defined in:
lib/add_monster.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#descriptionObject (readonly)

Returns the value of attribute description.



3
4
5
# File 'lib/add_monster.rb', line 3

def description
  @description
end

#locationObject (readonly)

Returns the value of attribute location.



3
4
5
# File 'lib/add_monster.rb', line 3

def location
  @location
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/add_monster.rb', line 3

def name
  @name
end