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.
1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 |
# File 'lib/FlightXML2REST.rb', line 1998 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.
1997 1998 1999 |
# File 'lib/FlightXML2REST.rb', line 1997 def nTafResult @nTafResult end |