Class: AirlineInfoResults
- Inherits:
-
Object
- Object
- AirlineInfoResults
- Defined in:
- lib/FlightXML2REST.rb
Instance Attribute Summary collapse
-
#airlineInfoResult ⇒ Object
Returns the value of attribute airlineInfoResult.
Instance Method Summary collapse
-
#initialize(airlineInfoResult = nil) ⇒ AirlineInfoResults
constructor
A new instance of AirlineInfoResults.
Constructor Details
#initialize(airlineInfoResult = nil) ⇒ AirlineInfoResults
Returns a new instance of AirlineInfoResults.
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
# File 'lib/FlightXML2REST.rb', line 230 def initialize(airlineInfoResult = nil) begin rawAirlineInfoResult = JSON.parse(airlineInfoResult) airlineInfoResult = rawAirlineInfoResult['AirlineInfoResult'] @airlineInfoResult = AirlineInfoStruct.new(airlineInfoResult['callsign'], airlineInfoResult['country'], airlineInfoResult['location'], airlineInfoResult['name'], airlineInfoResult['phone'], airlineInfoResult['shortname'], airlineInfoResult['url'] ) rescue raise FlightAwareError.new(rawAirlineInfoResult['error']).error end end |
Instance Attribute Details
#airlineInfoResult ⇒ Object
Returns the value of attribute airlineInfoResult.
229 230 231 |
# File 'lib/FlightXML2REST.rb', line 229 def airlineInfoResult @airlineInfoResult end |