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