Class: AircraftTypeResults
- Inherits:
-
Object
- Object
- AircraftTypeResults
- Defined in:
- lib/FlightXML2REST.rb
Instance Attribute Summary collapse
-
#aircraftTypeResult ⇒ Object
Returns the value of attribute aircraftTypeResult.
Instance Method Summary collapse
-
#initialize(aircraftTypeResult = nil) ⇒ AircraftTypeResults
constructor
A new instance of AircraftTypeResults.
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
#aircraftTypeResult ⇒ Object
Returns the value of attribute aircraftTypeResult.
21 22 23 |
# File 'lib/FlightXML2REST.rb', line 21 def aircraftTypeResult @aircraftTypeResult end |