Class: InboundFlightInfoResults

Inherits:
Object
  • Object
show all
Defined in:
lib/FlightXML2REST.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(inboundFlightInfoResult = nil) ⇒ InboundFlightInfoResults

Returns a new instance of InboundFlightInfoResults.



1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
# File 'lib/FlightXML2REST.rb', line 1542

def initialize(inboundFlightInfoResult = nil)
  begin
    rawInboundFlightInfoResult = JSON.parse(inboundFlightInfoResult)
    inboundFlightInfoResult = rawInboundFlightInfoResult['InboundFlightInfoResult']
    @inboundFlightInfoResult = FlightExStruct.new(inboundFlightInfoResult['actualarrivaltime'],
                                                  inboundFlightInfoResult['actualdeparturetime'],
                                                  inboundFlightInfoResult['aircrafttype'],
                                                  inboundFlightInfoResult['destination'],
                                                  inboundFlightInfoResult['destinationCity'],
                                                  inboundFlightInfoResult['destinationName'],
                                                  inboundFlightInfoResult['diverted'],
                                                  inboundFlightInfoResult['estimatedarrivaltime'],
                                                  inboundFlightInfoResult['faFlightID'],
                                                  inboundFlightInfoResult['filed_airspeed_kts'],
                                                  inboundFlightInfoResult['filed_airspeed_mach'],
                                                  inboundFlightInfoResult['filed_altitude'],
                                                  inboundFlightInfoResult['filed_departuretime'],
                                                  inboundFlightInfoResult['filed_ete'],
                                                  inboundFlightInfoResult['filed_time'],
                                                  inboundFlightInfoResult['ident'],
                                                  inboundFlightInfoResult['origin'],
                                                  inboundFlightInfoResult['originCity'],
                                                  inboundFlightInfoResult['originName'],
                                                  inboundFlightInfoResult['route']
                                                 )
  rescue
      raise FlightAwareError.new(rawInboundFlightInfoResult['error']).error
  end
end

Instance Attribute Details

#inboundFlightInfoResultObject

Returns the value of attribute inboundFlightInfoResult.



1541
1542
1543
# File 'lib/FlightXML2REST.rb', line 1541

def inboundFlightInfoResult
  @inboundFlightInfoResult
end