Class: AirportInfoResults
- Inherits:
-
Object
- Object
- AirportInfoResults
- Defined in:
- lib/FlightXML2REST.rb
Instance Attribute Summary collapse
-
#airportInfoResult ⇒ Object
Returns the value of attribute airportInfoResult.
Instance Method Summary collapse
-
#initialize(airportInfoResult = nil) ⇒ AirportInfoResults
constructor
A new instance of AirportInfoResults.
Constructor Details
#initialize(airportInfoResult = nil) ⇒ AirportInfoResults
Returns a new instance of AirportInfoResults.
379 380 381 382 383 384 385 386 387 388 389 390 391 392 |
# File 'lib/FlightXML2REST.rb', line 379 def initialize(airportInfoResult = nil) begin rawAirportInfoResult = JSON.parse(airportInfoResult) airportInfoResult = rawAirportInfoResult['AirportInfoResult'] @airportInfoResult = AirportInfoStruct.new(airportInfoResult['latitude'], airportInfoResult['location'], airportInfoResult['longitude'], airportInfoResult['name'], airportInfoResult['timezone'], ) rescue raise FlightAwareError.new(rawAirportInfoResult['error']).error end end |
Instance Attribute Details
#airportInfoResult ⇒ Object
Returns the value of attribute airportInfoResult.
378 379 380 |
# File 'lib/FlightXML2REST.rb', line 378 def airportInfoResult @airportInfoResult end |