Class: AllAirportsResults

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#allAirportsResultObject

Returns the value of attribute allAirportsResult.



448
449
450
# File 'lib/FlightXML2REST.rb', line 448

def allAirportsResult
  @allAirportsResult
end