Class: Starwars::Starship
- Inherits:
-
Base
- Object
- OpenStruct
- Base
- Starwars::Starship
show all
- Includes:
- Fetcher
- Defined in:
- lib/starwars/starship.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
'starships'
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
#cost_in_credits ⇒ Integer
21
|
# File 'lib/starwars/starship.rb', line 21
property :cost_in_credits, type: Integer
|
#created ⇒ Time
33
|
# File 'lib/starwars/starship.rb', line 33
property :created, type: Time
|
#hyperdrive_rating ⇒ Float
30
|
# File 'lib/starwars/starship.rb', line 30
property :hyperdrive_rating, type: Float
|
#name ⇒ String
14
|
# File 'lib/starwars/starship.rb', line 14
property :name
|
#pilots ⇒ Array
37
|
# File 'lib/starwars/starship.rb', line 37
collection :pilots, class: Starwars::Person, deserialize: ->(_, fragment, _) { Person.new(url: fragment) }
|