Class: AllAirportsResults
- Inherits:
-
Object
- Object
- AllAirportsResults
- Defined in:
- lib/FlightXML2REST.rb
Instance Attribute Summary collapse
-
#allAirportsResult ⇒ Object
Returns the value of attribute allAirportsResult.
Instance Method Summary collapse
-
#initialize(allAirportsResult = nil) ⇒ AllAirportsResults
constructor
A new instance of AllAirportsResults.
Constructor Details
#initialize(allAirportsResult = nil) ⇒ AllAirportsResults
Returns a new instance of AllAirportsResults.
449 450 451 452 453 454 455 456 457 458 459 460 |
# File 'lib/FlightXML2REST.rb', line 449 def initialize(allAirportsResult = nil) begin rawAllAirportsResult = JSON.parse(allAirportsResult) allAirportsResult = rawAllAirportsResult['AllAirportsResult'] @allAirportsResult = ArrayOfString.new() allAirportsResult['data'].each do |data| @allAirportsResult.data << data end rescue raise FlightAwareError.new(rawAllAirportsResult['error']).error end end |
Instance Attribute Details
#allAirportsResult ⇒ Object
Returns the value of attribute allAirportsResult.
448 449 450 |
# File 'lib/FlightXML2REST.rb', line 448 def allAirportsResult @allAirportsResult end |