Class: Starwars::Vehicle
- Inherits:
-
Base
- Object
- OpenStruct
- Base
- Starwars::Vehicle
show all
- Includes:
- Fetcher
- Defined in:
- lib/starwars/vehicle.rb,
lib/starwars.rb
Overview
A Film resource is an single film.
Constant Summary
collapse
- RESOURCE_NAME =
Define the source name in the starwars api
'vehicles'
Constants inherited
from Base
Base::BASE_URL, Base::FORMAT
Instance Method Summary
collapse
Methods included from Fetcher
included
Methods inherited from Base
#==, #fetch, fetch
Instance Method Details
#created ⇒ Time
31
|
# File 'lib/starwars/vehicle.rb', line 31
property :created, type: Time
|
#length ⇒ Float
28
|
# File 'lib/starwars/vehicle.rb', line 28
property :length, type: Float
|
#max_atmosphering_speed ⇒ Integer
22
|
# File 'lib/starwars/vehicle.rb', line 22
property :max_atmosphering_speed, type: Integer
|
#name ⇒ String
14
|
# File 'lib/starwars/vehicle.rb', line 14
property :name
|
#pilots ⇒ Array
35
|
# File 'lib/starwars/vehicle.rb', line 35
collection :pilots, class: Starwars::Person, deserialize: ->(_, fragment, _) { Person.new(url: fragment) }
|