Class: AirlineInfoResults

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#airlineInfoResultObject

Returns the value of attribute airlineInfoResult.



229
230
231
# File 'lib/FlightXML2REST.rb', line 229

def airlineInfoResult
  @airlineInfoResult
end