Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # frozen_string_literal: true
- module Vehicle
- class Crasher
- def initialize(vehicle)
- @vehicle = vehicle
- end
- def run
- return if vehicle.parked? || vehicle.stalled?
- vehicle.update_attributes(state: 'stalled')
- end
- end
- end
Add Comment
Please, Sign In to add comment