Class: Rome2rio::Airport

Inherits:
Object
  • Object
show all
Defined in:
lib/rome2rio/response/airport.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#codeObject (readonly)

Returns the value of attribute code.



3
4
5
# File 'lib/rome2rio/response/airport.rb', line 3

def code
  @code
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/rome2rio/response/airport.rb', line 3

def name
  @name
end

#posObject (readonly)

Returns the value of attribute pos.



3
4
5
# File 'lib/rome2rio/response/airport.rb', line 3

def pos
  @pos
end