Class: DuffelAPI::Resources::Aircraft

Inherits:
BaseResource show all
Defined in:
lib/duffel_api/resources/aircraft.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseResource

#api_response

Constructor Details

#initialize(object, response = nil) ⇒ Aircraft

Returns a new instance of Aircraft.



16
17
18
19
20
21
22
23
24
# File 'lib/duffel_api/resources/aircraft.rb', line 16

def initialize(object, response = nil)
  @object = object

  @iata_code = object["iata_code"]
  @id = object["id"]
  @name = object["name"]

  super(object, response)
end

Instance Attribute Details

#iata_codeString (readonly)

Returns:

  • (String)


8
9
10
# File 'lib/duffel_api/resources/aircraft.rb', line 8

def iata_code
  @iata_code
end

#idString (readonly)

Returns:

  • (String)


11
12
13
# File 'lib/duffel_api/resources/aircraft.rb', line 11

def id
  @id
end

#nameString (readonly)

Returns:

  • (String)


14
15
16
# File 'lib/duffel_api/resources/aircraft.rb', line 14

def name
  @name
end