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