Module: Vehicle

Included in:
SimpleCar
Defined in:
lib/vehicle.rb

Overview

Contract (mixin) for any vehicle with basic identity, state, and engine control.

Including classes must provide: id, make, model, year, wheels, is_running, start, stop.

Instance Method Summary collapse

Instance Method Details

#idObject

Raises:

  • (NotImplementedError)


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

def id
  raise NotImplementedError
end

#is_runningObject

Raises:

  • (NotImplementedError)


27
28
29
# File 'lib/vehicle.rb', line 27

def is_running
  raise NotImplementedError
end

#makeObject

Raises:

  • (NotImplementedError)


11
12
13
# File 'lib/vehicle.rb', line 11

def make
  raise NotImplementedError
end

#modelObject

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/vehicle.rb', line 15

def model
  raise NotImplementedError
end

#startObject

Raises:

  • (NotImplementedError)


31
32
33
# File 'lib/vehicle.rb', line 31

def start
  raise NotImplementedError
end

#stopObject

Raises:

  • (NotImplementedError)


35
36
37
# File 'lib/vehicle.rb', line 35

def stop
  raise NotImplementedError
end

#wheelsObject

Raises:

  • (NotImplementedError)


23
24
25
# File 'lib/vehicle.rb', line 23

def wheels
  raise NotImplementedError
end

#yearObject

Raises:

  • (NotImplementedError)


19
20
21
# File 'lib/vehicle.rb', line 19

def year
  raise NotImplementedError
end