Class: Rome2rio::FlightHop
- Inherits:
-
Object
- Object
- Rome2rio::FlightHop
- Defined in:
- lib/rome2rio/response/flight_hop.rb
Instance Attribute Summary collapse
-
#aircraft ⇒ Object
readonly
Returns the value of attribute aircraft.
-
#airline ⇒ Object
readonly
Returns the value of attribute airline.
-
#codeshares ⇒ Object
readonly
Returns the value of attribute codeshares.
-
#dayChange ⇒ Object
readonly
Returns the value of attribute dayChange.
-
#duration ⇒ Object
readonly
Returns the value of attribute duration.
-
#flight ⇒ Object
readonly
Returns the value of attribute flight.
-
#lDayChange ⇒ Object
readonly
Returns the value of attribute lDayChange.
-
#lDuration ⇒ Object
readonly
Returns the value of attribute lDuration.
-
#sCode ⇒ Object
readonly
Returns the value of attribute sCode.
-
#sTerminal ⇒ Object
readonly
Returns the value of attribute sTerminal.
-
#sTime ⇒ Object
readonly
Returns the value of attribute sTime.
-
#tCode ⇒ Object
readonly
Returns the value of attribute tCode.
-
#tTerminal ⇒ Object
readonly
Returns the value of attribute tTerminal.
-
#tTime ⇒ Object
readonly
Returns the value of attribute tTime.
Instance Method Summary collapse
-
#initialize(json) ⇒ FlightHop
constructor
A new instance of FlightHop.
Constructor Details
#initialize(json) ⇒ FlightHop
Returns a new instance of FlightHop.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/rome2rio/response/flight_hop.rb', line 7 def initialize(json) @sCode = json["sCode"] @tCode = json["tCode"] @sTerminal = json["sTerminal"] @tTerminal = json["tTerminal"] @sTime = json["sTime"] @tTime = json["tTime"] @airline = json["airline"] @flight = json["flight"] @duration = json["duration"] @aircraft = json["aircraft"] @dayChange = json["dayChange"] if json["dayChange"] @lDuration = json["lDuration"] if json["lDuration"] @lDayChange = json["lDayChange"] if json["lDayChange"] @codeshares = [] json["codeshares"].each { |codeshare| @codeshares << Codeshare.new(codeshare) } end |
Instance Attribute Details
#aircraft ⇒ Object (readonly)
Returns the value of attribute aircraft.
3 4 5 |
# File 'lib/rome2rio/response/flight_hop.rb', line 3 def aircraft @aircraft end |
#airline ⇒ Object (readonly)
Returns the value of attribute airline.
3 4 5 |
# File 'lib/rome2rio/response/flight_hop.rb', line 3 def airline @airline end |
#codeshares ⇒ Object (readonly)
Returns the value of attribute codeshares.
3 4 5 |
# File 'lib/rome2rio/response/flight_hop.rb', line 3 def codeshares @codeshares end |
#dayChange ⇒ Object (readonly)
Returns the value of attribute dayChange.
3 4 5 |
# File 'lib/rome2rio/response/flight_hop.rb', line 3 def dayChange @dayChange end |
#duration ⇒ Object (readonly)
Returns the value of attribute duration.
3 4 5 |
# File 'lib/rome2rio/response/flight_hop.rb', line 3 def duration @duration end |
#flight ⇒ Object (readonly)
Returns the value of attribute flight.
3 4 5 |
# File 'lib/rome2rio/response/flight_hop.rb', line 3 def flight @flight end |
#lDayChange ⇒ Object (readonly)
Returns the value of attribute lDayChange.
3 4 5 |
# File 'lib/rome2rio/response/flight_hop.rb', line 3 def lDayChange @lDayChange end |
#lDuration ⇒ Object (readonly)
Returns the value of attribute lDuration.
3 4 5 |
# File 'lib/rome2rio/response/flight_hop.rb', line 3 def lDuration @lDuration end |
#sCode ⇒ Object (readonly)
Returns the value of attribute sCode.
3 4 5 |
# File 'lib/rome2rio/response/flight_hop.rb', line 3 def sCode @sCode end |
#sTerminal ⇒ Object (readonly)
Returns the value of attribute sTerminal.
3 4 5 |
# File 'lib/rome2rio/response/flight_hop.rb', line 3 def sTerminal @sTerminal end |
#sTime ⇒ Object (readonly)
Returns the value of attribute sTime.
3 4 5 |
# File 'lib/rome2rio/response/flight_hop.rb', line 3 def sTime @sTime end |
#tCode ⇒ Object (readonly)
Returns the value of attribute tCode.
3 4 5 |
# File 'lib/rome2rio/response/flight_hop.rb', line 3 def tCode @tCode end |
#tTerminal ⇒ Object (readonly)
Returns the value of attribute tTerminal.
3 4 5 |
# File 'lib/rome2rio/response/flight_hop.rb', line 3 def tTerminal @tTerminal end |
#tTime ⇒ Object (readonly)
Returns the value of attribute tTime.
3 4 5 |
# File 'lib/rome2rio/response/flight_hop.rb', line 3 def tTime @tTime end |