Class: NTafResults
- Inherits:
-
Object
- Object
- NTafResults
- Defined in:
- lib/FlightXML2REST.rb
Instance Attribute Summary collapse
-
#nTafResult ⇒ Object
Returns the value of attribute nTafResult.
Instance Method Summary collapse
-
#initialize(nTafResult = nil) ⇒ NTafResults
constructor
A new instance of NTafResults.
Constructor Details
#initialize(nTafResult = nil) ⇒ NTafResults
Returns a new instance of NTafResults.
1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 |
# File 'lib/FlightXML2REST.rb', line 1994 def initialize(nTafResult = nil) begin rawNTafResult = JSON.parse(nTafResult) nTafResult = JSON.parse(nTafResult)['NTafResult'] @nTafResult = TafStruct.new(nTafResult['airport'], nTafResult['forecast'].each { |v| v}, nTafResult['timeString'] ) rescue raise FlightAwareError.new(rawNTafResultResult['error']).error end end |
Instance Attribute Details
#nTafResult ⇒ Object
Returns the value of attribute nTafResult.
1993 1994 1995 |
# File 'lib/FlightXML2REST.rb', line 1993 def nTafResult @nTafResult end |