Class: SearchBirdseyeInFlightResults
- Inherits:
-
Object
- Object
- SearchBirdseyeInFlightResults
- Defined in:
- lib/FlightXML2REST.rb
Instance Attribute Summary collapse
-
#searchBirdseyeInFlightResult ⇒ Object
Returns the value of attribute searchBirdseyeInFlightResult.
Instance Method Summary collapse
-
#initialize(searchBirdseyeInFlightResult = nil) ⇒ SearchBirdseyeInFlightResults
constructor
A new instance of SearchBirdseyeInFlightResults.
Constructor Details
#initialize(searchBirdseyeInFlightResult = nil) ⇒ SearchBirdseyeInFlightResults
Returns a new instance of SearchBirdseyeInFlightResults.
2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 |
# File 'lib/FlightXML2REST.rb', line 2315 def initialize(searchBirdseyeInFlightResult = nil) begin rawSearchBirdseyeInFlightResult = JSON.parse(searchBirdseyeInFlightResult) searchBirdseyeInFlightResult = rawSearchBirdseyeInFlightResult['SearchBirdseyeInFlightResult'] @searchBirdseyeInFlightResult = InFlightStruct.new([], searchBirdseyeInFlightResult['next_offset']) searchBirdseyeInFlightResult['aircraft'].each do |aircraft| @searchBirdseyeInFlightResult.aircraft << InFlightAircraftStruct.new(aircraft['altitude'], aircraft['altitudeChange'], aircraft['altitudeStatus'], aircraft['departureTime'], aircraft['destination'], aircraft['faFlightID'], aircraft['firstPositionTime'], aircraft['groundspeed'], aircraft['heading'], aircraft['highLatitude'], aircraft['highLongitude'], aircraft['ident'], aircraft['latitude'], aircraft['longitude'], aircraft['lowLatitude'], aircraft['lowLongitude'], aircraft['origin'], aircraft['prefix'], aircraft['suffix'], aircraft['timeout'], aircraft['timestamp'], aircraft['type'], aircraft['updateType'], aircraft['waypoints'] ) end rescue raise FlightAwareError.new(rawSearchBirdseyeInFlightResult['error']).error end end |
Instance Attribute Details
#searchBirdseyeInFlightResult ⇒ Object
Returns the value of attribute searchBirdseyeInFlightResult.
2314 2315 2316 |
# File 'lib/FlightXML2REST.rb', line 2314 def searchBirdseyeInFlightResult @searchBirdseyeInFlightResult end |