Class: MetarResults

Inherits:
Object
  • Object
show all
Defined in:
lib/FlightXML2REST.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(metarResult = nil) ⇒ MetarResults

Returns a new instance of MetarResults.



1858
1859
1860
1861
1862
1863
1864
1865
1866
# File 'lib/FlightXML2REST.rb', line 1858

def initialize(metarResult = nil)
  begin
    rawMetarResult = JSON.parse(metarResult)
    metarResult = rawMetarResult['MetarResult']
    @metarResult = metarResult
  rescue
      raise FlightAwareError.new(rawMetarResult['error']).error
  end
end

Instance Attribute Details

#metarResultObject

Returns the value of attribute metarResult.



1857
1858
1859
# File 'lib/FlightXML2REST.rb', line 1857

def metarResult
  @metarResult
end