Class: Starwars::Vehicle

Inherits:
Base
  • Object
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

#createdTime



31
# File 'lib/starwars/vehicle.rb', line 31

property :created, type: Time

#lengthFloat



28
# File 'lib/starwars/vehicle.rb', line 28

property :length, type: Float

#max_atmosphering_speedInteger



22
# File 'lib/starwars/vehicle.rb', line 22

property :max_atmosphering_speed, type: Integer

#nameString



14
# File 'lib/starwars/vehicle.rb', line 14

property :name

#pilotsArray



35
# File 'lib/starwars/vehicle.rb', line 35

collection :pilots, class: Starwars::Person,  deserialize: ->(_, fragment, _) { Person.new(url: fragment) }