Class: CountAirportOperationsResults

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(countAirportOperationsResult = nil) ⇒ CountAirportOperationsResults

Returns a new instance of CountAirportOperationsResults.



586
587
588
589
590
591
592
593
594
595
596
597
598
# File 'lib/FlightXML2REST.rb', line 586

def initialize(countAirportOperationsResult = nil)
  begin
    rawCountAirportOperationsResult = JSON.parse(countAirportOperationsResult)
    countAirportOperationsResult = rawCountAirportOperationsResult['CountAirportOperationsResult']
    @countAirportOperationsResult = CountAirportOperationsStruct.new(countAirportOperationsResult['departed'], 
                                                           countAirportOperationsResult['enroute'], 
                                                           countAirportOperationsResult['scheduled_arrivals'],
                                                           countAirportOperationsResult['scheduled_departures']
                                                          )
  rescue
      raise FlightAwareError.new(rawCountAirportOperatonsResult['error']).error
  end
end

Instance Attribute Details

#countAirportOperationsResultObject

Returns the value of attribute countAirportOperationsResult.



585
586
587
# File 'lib/FlightXML2REST.rb', line 585

def countAirportOperationsResult
  @countAirportOperationsResult
end