Class: TafResults
- Inherits:
-
Object
- Object
- TafResults
- Defined in:
- lib/FlightXML2REST.rb
Instance Attribute Summary collapse
-
#tafResult ⇒ Object
Returns the value of attribute tafResult.
Instance Method Summary collapse
-
#initialize(tafResult = nil) ⇒ TafResults
constructor
A new instance of TafResults.
Constructor Details
#initialize(tafResult = nil) ⇒ TafResults
Returns a new instance of TafResults.
2557 2558 2559 2560 2561 2562 2563 2564 2565 |
# File 'lib/FlightXML2REST.rb', line 2557 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
#tafResult ⇒ Object
Returns the value of attribute tafResult.
2556 2557 2558 |
# File 'lib/FlightXML2REST.rb', line 2556 def tafResult @tafResult end |