Class: AirportInfoResults

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(airportInfoResult = nil) ⇒ AirportInfoResults

Returns a new instance of AirportInfoResults.



379
380
381
382
383
384
385
386
387
388
389
390
391
392
# File 'lib/FlightXML2REST.rb', line 379

def initialize(airportInfoResult = nil)
  begin
  rawAirportInfoResult = JSON.parse(airportInfoResult)
  airportInfoResult = rawAirportInfoResult['AirportInfoResult']
  @airportInfoResult = AirportInfoStruct.new(airportInfoResult['latitude'], 
                                              airportInfoResult['location'],
                                              airportInfoResult['longitude'],
                                              airportInfoResult['name'],
                                              airportInfoResult['timezone'],   
                                              )
  rescue
      raise FlightAwareError.new(rawAirportInfoResult['error']).error
  end
end

Instance Attribute Details

#airportInfoResultObject

Returns the value of attribute airportInfoResult.



378
379
380
# File 'lib/FlightXML2REST.rb', line 378

def airportInfoResult
  @airportInfoResult
end