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
- #id ⇒ Object
- #is_running ⇒ Object
- #make ⇒ Object
- #model ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
- #wheels ⇒ Object
- #year ⇒ Object
Instance Method Details
#id ⇒ Object
7 8 9 |
# File 'lib/vehicle.rb', line 7 def id raise NotImplementedError end |
#is_running ⇒ Object
27 28 29 |
# File 'lib/vehicle.rb', line 27 def is_running raise NotImplementedError end |
#make ⇒ Object
11 12 13 |
# File 'lib/vehicle.rb', line 11 def make raise NotImplementedError end |
#model ⇒ Object
15 16 17 |
# File 'lib/vehicle.rb', line 15 def model raise NotImplementedError end |
#start ⇒ Object
31 32 33 |
# File 'lib/vehicle.rb', line 31 def start raise NotImplementedError end |
#stop ⇒ Object
35 36 37 |
# File 'lib/vehicle.rb', line 35 def stop raise NotImplementedError end |
#wheels ⇒ Object
23 24 25 |
# File 'lib/vehicle.rb', line 23 def wheels raise NotImplementedError end |
#year ⇒ Object
19 20 21 |
# File 'lib/vehicle.rb', line 19 def year raise NotImplementedError end |