Class: TailOwnerResults

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tailOwnerResult = nil) ⇒ TailOwnerResults

Returns a new instance of TailOwnerResults.



2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
# File 'lib/FlightXML2REST.rb', line 2578

def initialize(tailOwnerResult = nil)
  begin
    rawTailOwnerResult = JSON.parse(tailOwnerResult)
    tailOwnerResult = rawTailOwnerResult['TailOwnerResult']
    @tailOwnerResult = TailOwnerStruct.new(tailOwnerResult['location'],
                                           tailOwnerResult['location2'],
                                           tailOwnerResult['owner'],
                                           tailOwnerResult['website']
                                          )
  rescue
      raise FlightAwareError.new(rawTailOwnerResult['error']).error
  end
end

Instance Attribute Details

#tailOwnerResultObject

Returns the value of attribute tailOwnerResult.



2577
2578
2579
# File 'lib/FlightXML2REST.rb', line 2577

def tailOwnerResult
  @tailOwnerResult
end