Class: MetarExResults
- Inherits:
-
Object
- Object
- MetarExResults
- Defined in:
- lib/FlightXML2REST.rb
Instance Attribute Summary collapse
-
#metarExResult ⇒ Object
Returns the value of attribute metarExResult.
Instance Method Summary collapse
-
#initialize(metarExResult = nil) ⇒ MetarExResults
constructor
A new instance of MetarExResults.
Constructor Details
#initialize(metarExResult = nil) ⇒ MetarExResults
Returns a new instance of MetarExResults.
1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 |
# File 'lib/FlightXML2REST.rb', line 1886 def initialize( = nil) begin rawMetarExResult = JSON.parse() = rawMetarExResult['MetarExResult'] @metarExResult = ArrayOfMetarStruct.new([], ['next_offset']) ['metar'].each do || @metarExResult. << MetarStruct.new(['airport'], ['cloud_altitude'], ['cloud_friendly'], ['cloud_type'], ['conditions'], ['pressure'], ['raw_data'], ['temp_air'], ['temp_dewpoint'], ['temp_relhum'], ['time'], ['visibility'], ['wind_direction'], ['wind_friendly'], ['wind_speed'], ['wind_speed_gust'] ) end rescue raise FlightAwareError.new(rawMetarExResult['error']).error end end |
Instance Attribute Details
#metarExResult ⇒ Object
Returns the value of attribute metarExResult.
1885 1886 1887 |
# File 'lib/FlightXML2REST.rb', line 1885 def @metarExResult end |