Class: DuffelAPI::Resources::Aircraft
- Inherits:
-
BaseResource
- Object
- BaseResource
- DuffelAPI::Resources::Aircraft
- Defined in:
- lib/duffel_api/resources/aircraft.rb
Instance Attribute Summary collapse
- #iata_code ⇒ String readonly
- #id ⇒ String readonly
- #name ⇒ String readonly
Instance Method Summary collapse
-
#initialize(object, response = nil) ⇒ Aircraft
constructor
A new instance of Aircraft.
Methods inherited from BaseResource
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_code ⇒ String (readonly)
8 9 10 |
# File 'lib/duffel_api/resources/aircraft.rb', line 8 def iata_code @iata_code end |
#id ⇒ String (readonly)
11 12 13 |
# File 'lib/duffel_api/resources/aircraft.rb', line 11 def id @id end |
#name ⇒ String (readonly)
14 15 16 |
# File 'lib/duffel_api/resources/aircraft.rb', line 14 def name @name end |