Class: TafResults

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tafResult = nil) ⇒ TafResults

Returns a new instance of TafResults.



2553
2554
2555
2556
2557
2558
2559
2560
2561
# File 'lib/FlightXML2REST.rb', line 2553

def initialize(tafResult = nil)
  begin
    rawTafResult = JSON.parse(tafResult)
    tafResult = rawTafResult['TafResult']
    @tafResult = tafResult
  rescue
      raise FlightAwareError.new(rawTafResult['error']).error
  end
end

Instance Attribute Details

#tafResultObject

Returns the value of attribute tafResult.



2552
2553
2554
# File 'lib/FlightXML2REST.rb', line 2552

def tafResult
  @tafResult
end