Class: SearchBirdseyePositionsResults
- Inherits:
-
Object
- Object
- SearchBirdseyePositionsResults
- Defined in:
- lib/FlightXML2REST.rb
Instance Attribute Summary collapse
-
#searchBirdseyePositionsResult ⇒ Object
Returns the value of attribute searchBirdseyePositionsResult.
Instance Method Summary collapse
-
#initialize(searchBirdseyePositionsResult = nil) ⇒ SearchBirdseyePositionsResults
constructor
A new instance of SearchBirdseyePositionsResults.
Constructor Details
#initialize(searchBirdseyePositionsResult = nil) ⇒ SearchBirdseyePositionsResults
Returns a new instance of SearchBirdseyePositionsResults.
2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 |
# File 'lib/FlightXML2REST.rb', line 2369 def initialize(searchBirdseyePositionsResult = nil) begin rawSearchBirdseyePositionResult = JSON.parse(searchBirdseyePositionsResult) searchBirdseyePositionsResult = rawSearchBirdseyePositionResult['SearchBirdseyePositionsResult'] @searchBirdseyePositionsResult = ArrayOfTrackExStruct.new([], searchBirdseyePositionsResult['next_offset']) searchBirdseyePositionsResult['data'].each do |track| @searchBirdseyePositionsResult.data << TrackExStruct.new(track['altitude'], track['altitudeChange'], track['altitudeStatus'], track['faFlightID'], track['groundspeed'], track['latitude'], track['longitude'], track['timestamp'], track['updateType'] ) end rescue raise FlightAwareError.new(rawSearchBirdseyePositionResult['error']).error end end |
Instance Attribute Details
#searchBirdseyePositionsResult ⇒ Object
Returns the value of attribute searchBirdseyePositionsResult.
2368 2369 2370 |
# File 'lib/FlightXML2REST.rb', line 2368 def searchBirdseyePositionsResult @searchBirdseyePositionsResult end |