Class: Starwars::Vehicle
- Inherits:
-
Base
- Object
- OpenStruct
- Base
- Starwars::Vehicle
- Defined in:
- lib/starwars/resources/vehicle.rb,
lib/starwars.rb
Overview
A Vehicle resource is a single transport craft that does not have hyperdrive capability.
Constant Summary collapse
- RESOURCE_NAME =
Define the source name in the starwars api
'vehicles'
Constants inherited from Base
Instance Method Summary collapse
-
#cargo_capacity ⇒ Integer
The maximum number of kilograms that this vehicle can transport.
-
#consumables ⇒ String
consumables.
-
#cost_in_credits ⇒ String
The cost of this vehicle new, in Galactic Credits.
-
#crew ⇒ Integer
The number of personnel needed to run or pilot this vehicle.
-
#films ⇒ Array<Film>
List of films.
-
#length ⇒ Float
The length of this vehicle in meters.
-
#manufacturer ⇒ String
The manufacturer of this vehicle.
-
#max_atmosphering_speed ⇒ Integer
The maximum speed of this vehicle in atmosphere.
-
#model ⇒ String
The model or official name of this vehicle.
-
#name ⇒ String
The name of this vehicle.
-
#passengers ⇒ Integer
The number of non-essential people this vehicle can transport.
-
#pilots ⇒ Array<Pilot>
List of pilots.
-
#vehicle_class ⇒ String
The class of this vehicle, such as “Wheeled” or “Repulsorcraft”.
Methods inherited from Base
#==, #created, #edited, fetch, #fetch, fetch_all, #id, #request_attributes, #url
Methods inherited from OpenStruct
Instance Method Details
#cargo_capacity ⇒ Integer
The maximum number of kilograms that this vehicle can transport
83 |
# File 'lib/starwars/resources/vehicle.rb', line 83 property :cargo_capacity, type: Integer |
#consumables ⇒ String
consumables
41 |
# File 'lib/starwars/resources/vehicle.rb', line 41 property :consumables |
#cost_in_credits ⇒ String
The cost of this vehicle new, in Galactic Credits
55 |
# File 'lib/starwars/resources/vehicle.rb', line 55 property :cost_in_credits |
#crew ⇒ Integer
The number of personnel needed to run or pilot this vehicle
69 |
# File 'lib/starwars/resources/vehicle.rb', line 69 property :crew, type: Integer |
#films ⇒ Array<Film>
List of films
104 |
# File 'lib/starwars/resources/vehicle.rb', line 104 collection :films, class: Starwars::Film, deserialize: ->(_, fragment, _) { Film.new(url: fragment) } |
#length ⇒ Float
The length of this vehicle in meters
90 |
# File 'lib/starwars/resources/vehicle.rb', line 90 property :length, type: Float |
#manufacturer ⇒ String
The manufacturer of this vehicle. Comma-seperated if more than one
34 |
# File 'lib/starwars/resources/vehicle.rb', line 34 property :manufacturer |
#max_atmosphering_speed ⇒ Integer
The maximum speed of this vehicle in atmosphere
62 |
# File 'lib/starwars/resources/vehicle.rb', line 62 property :max_atmosphering_speed, type: Integer |
#model ⇒ String
The model or official name of this vehicle
27 |
# File 'lib/starwars/resources/vehicle.rb', line 27 property :model |
#name ⇒ String
The common name, such as “Sand Crawler” or “Speeder bike”
The name of this vehicle
20 |
# File 'lib/starwars/resources/vehicle.rb', line 20 property :name |
#passengers ⇒ Integer
The number of non-essential people this vehicle can transport
76 |
# File 'lib/starwars/resources/vehicle.rb', line 76 property :passengers, type: Integer |
#pilots ⇒ Array<Pilot>
List of pilots
97 |
# File 'lib/starwars/resources/vehicle.rb', line 97 collection :pilots, class: Starwars::Person, deserialize: ->(_, fragment, _) { Person.new(url: fragment) } |
#vehicle_class ⇒ String
The class of this vehicle, such as “Wheeled” or “Repulsorcraft”
48 |
# File 'lib/starwars/resources/vehicle.rb', line 48 property :vehicle_class |