Class: Smartcar::VehicleAttributes

Inherits:
Base
  • Object
show all
Defined in:
lib/smartcar/vehicle_attributes.rb

Overview

class to represent Vehicle attributes like make model year

Constant Summary collapse

PATH =

Path Proc for hitting vehicle attributes end point

Proc.new{|id| "/vehicles/#{id}"}

Constants inherited from Base

Base::BASIC, Base::BEARER

Instance Attribute Summary collapse

Attributes inherited from Base

#error, #meta, #token

Method Summary

Methods inherited from Base

#fetch

Methods included from Utils

#get_config, #get_error, #initialize

Instance Attribute Details

#idString

Smartcar vehicle ID

Returns:

  • (String)

    the current value of id



7
8
9
# File 'lib/smartcar/vehicle_attributes.rb', line 7

def id
  @id
end

#makeString

Manufacturer of the vehicle.

Returns:

  • (String)

    the current value of make



7
8
9
# File 'lib/smartcar/vehicle_attributes.rb', line 7

def make
  @make
end

#modelString

Model of the vehicle.

Returns:

  • (String)

    the current value of model



7
8
9
# File 'lib/smartcar/vehicle_attributes.rb', line 7

def model
  @model
end

#yearNumber

Model year of the vehicle.

Returns:

  • (Number)

    the current value of year



7
8
9
# File 'lib/smartcar/vehicle_attributes.rb', line 7

def year
  @year
end