Class: Rome2rio::Airport
- Inherits:
-
Object
- Object
- Rome2rio::Airport
- Defined in:
- lib/rome2rio/response/airport.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#pos ⇒ Object
readonly
Returns the value of attribute pos.
Instance Method Summary collapse
-
#initialize(json) ⇒ Airport
constructor
A new instance of Airport.
Constructor Details
#initialize(json) ⇒ Airport
Returns a new instance of Airport.
4 5 6 7 8 |
# File 'lib/rome2rio/response/airport.rb', line 4 def initialize(json) @code = json["code"] @name = json["name"] @pos = Position.parse(json["pos"]) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
3 4 5 |
# File 'lib/rome2rio/response/airport.rb', line 3 def code @code end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/rome2rio/response/airport.rb', line 3 def name @name end |
#pos ⇒ Object (readonly)
Returns the value of attribute pos.
3 4 5 |
# File 'lib/rome2rio/response/airport.rb', line 3 def pos @pos end |