Class: InFlightInfoResults
- Inherits:
-
Object
- Object
- InFlightInfoResults
- Defined in:
- lib/FlightXML2REST.rb
Instance Attribute Summary collapse
-
#inFlightInfoResult ⇒ Object
Returns the value of attribute inFlightInfoResult.
Instance Method Summary collapse
-
#initialize(inFlightInfoResult = nil) ⇒ InFlightInfoResults
constructor
A new instance of InFlightInfoResults.
Constructor Details
#initialize(inFlightInfoResult = nil) ⇒ InFlightInfoResults
Returns a new instance of InFlightInfoResults.
1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 |
# File 'lib/FlightXML2REST.rb', line 1583 def initialize(inFlightInfoResult = nil) begin rawInFlightInfoResult = JSON.parse(inFlightInfoResult) inFlightInfoResult = rawInFlightInfoResult['InFlightInfoResult'] @inFlightInfoResult = InFlightAircraftStruct.new(inFlightInfoResult['altitude'], inFlightInfoResult['altitudeChange'], inFlightInfoResult['altitudeStatus'], inFlightInfoResult['departureTime'], inFlightInfoResult['destination'], inFlightInfoResult['faFlightID'], inFlightInfoResult['firstPositionTime'], inFlightInfoResult['groundspeed'], inFlightInfoResult['heading'], inFlightInfoResult['highLatitude'], inFlightInfoResult['highLongitude'], inFlightInfoResult['ident'], inFlightInfoResult['latitude'], inFlightInfoResult['longitude'], inFlightInfoResult['lowLatitude'], inFlightInfoResult['lowLongitude'], inFlightInfoResult['origin'], inFlightInfoResult['prefix'], inFlightInfoResult['suffix'], inFlightInfoResult['timeout'], inFlightInfoResult['timestamp'], inFlightInfoResult['type'], inFlightInfoResult['updateType'], inFlightInfoResult['waypoints'] ) rescue raise FlightAwareError.new(rawInFlightInfoResult['error']).error end end |
Instance Attribute Details
#inFlightInfoResult ⇒ Object
Returns the value of attribute inFlightInfoResult.
1582 1583 1584 |
# File 'lib/FlightXML2REST.rb', line 1582 def inFlightInfoResult @inFlightInfoResult end |