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.
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
#tafResult ⇒ Object
Returns the value of attribute tafResult.
2552 2553 2554 |
# File 'lib/FlightXML2REST.rb', line 2552 def tafResult @tafResult end |