class Rome2rio::FlightHop

Attributes

aircraft[R]
airline[R]
codeshares[R]
dayChange[R]
duration[R]
flight[R]
lDayChange[R]
lDuration[R]
sCode[R]
sTerminal[R]
sTime[R]
tCode[R]
tTerminal[R]
tTime[R]

Public Class Methods

new(json) click to toggle source
# 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