Class: AircraftTypeResults

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(aircraftTypeResult = nil) ⇒ AircraftTypeResults

Returns a new instance of AircraftTypeResults.



22
23
24
25
26
27
28
29
30
# File 'lib/FlightXML2REST.rb', line 22

def initialize(aircraftTypeResult = nil)
  begin
    rawAircraftTypeResult = JSON.parse(aircraftTypeResult)
    aircraftTypeResult = JSON.parse(aircraftTypeResult)['AircraftTypeResult']
    @aircraftTypeResult = AircraftTypeStruct.new(aircraftTypeResult['description'], aircraftTypeResult['manufacturer'], aircraftTypeResult['type'])
  rescue
      raise FlightAwareError.new(rawAircraftTypeResult['error']).error
  end
end

Instance Attribute Details

#aircraftTypeResultObject

Returns the value of attribute aircraftTypeResult.



21
22
23
# File 'lib/FlightXML2REST.rb', line 21

def aircraftTypeResult
  @aircraftTypeResult
end