Class: AirlineFlightInfoResults
- Inherits:
-
Object
- Object
- AirlineFlightInfoResults
- Defined in:
- lib/FlightXML2REST.rb
Instance Attribute Summary collapse
-
#airlineFlightInfoResult ⇒ Object
Returns the value of attribute airlineFlightInfoResult.
Instance Method Summary collapse
-
#initialize(airlineFlightInfoResult = nil) ⇒ AirlineFlightInfoResults
constructor
A new instance of AirlineFlightInfoResults.
Constructor Details
#initialize(airlineFlightInfoResult = nil) ⇒ AirlineFlightInfoResults
Returns a new instance of AirlineFlightInfoResults.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/FlightXML2REST.rb', line 55 def initialize(airlineFlightInfoResult = nil) begin rawAirlineFlightInfoResult = JSON.parse(airlineFlightInfoResult) airlineFlightInfoResult = rawAirlineFlightInfoResult['AirlineFlightInfoResult'] @airlineFlightInfoResult = AirlineFlightInfoStruct.new( airlineFlightInfoResult['bag_claim'], airlineFlightInfoResult['codeshares'], airlineFlightInfoResult['faFlightID'], airlineFlightInfoResult['gate_dest'], airlineFlightInfoResult['gate_orig'], airlineFlightInfoResult['ident'], airlineFlightInfoResult['meal_service'], airlineFlightInfoResult['seats_cabin_business'], airlineFlightInfoResult['seats_cabin_coach'], airlineFlightInfoResult['seats_cabin_first'], airlineFlightInfoResult['tailnumber'], airlineFlightInfoResult['terminal_dest'], airlineFlightInfoResult['terminal_orig'] ) rescue raise FlightAwareError.new(rawAirlineFlightInfoResult['error']).error end end |
Instance Attribute Details
#airlineFlightInfoResult ⇒ Object
Returns the value of attribute airlineFlightInfoResult.
54 55 56 |
# File 'lib/FlightXML2REST.rb', line 54 def airlineFlightInfoResult @airlineFlightInfoResult end |