public
Last active — forked from cheeyeo/example2.rb

  • Download Gist
example2.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
module Engine
def initialize
@engine_running = false
end
 
def start_engine
@engine_running = true
end
 
def stop_engine
@engine_running = false
end
end
 
 
class Car < Vehicle
include Engine
 
def sunday_drive
start_engine
stop_engine
end
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.