Class: Starwars::Specie
- Inherits:
-
Base
- Object
- OpenStruct
- Base
- Starwars::Specie
show all
- Includes:
- Fetcher
- Defined in:
- lib/starwars/specie.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
'species'
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
#average_height ⇒ Integer
27
|
# File 'lib/starwars/specie.rb', line 27
property :average_height, type: Integer
|
#created ⇒ Time
31
|
# File 'lib/starwars/specie.rb', line 31
property :created, type: Time
|
24
|
# File 'lib/starwars/specie.rb', line 24
property :homeworld, class: Starwars::Planet, deserialize: ->(_, fragment, _) { Planet.new(url: fragment) }
|
#name ⇒ String
14
|
# File 'lib/starwars/specie.rb', line 14
property :name
|
#people ⇒ Array
35
|
# File 'lib/starwars/specie.rb', line 35
collection :people, class: Starwars::Person, deserialize: ->(_, fragment, _) { Person.new(url: fragment) }
|