Last active
March 20, 2017 14:04
-
-
Save lbrito1/22f11238af789d38d98e74a2c64a5447 to your computer and use it in GitHub Desktop.
Example #1 - Don't obsess over code DRYness
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example 1 | |
class Car | |
include Checkups | |
def maintenance_10k | |
check_break_fluid | |
check_battery_terminals | |
check_engine_oil | |
end | |
def maintenance_30k | |
check_break_fluid | |
check_battery_terminals | |
check_engine_oil | |
check_spare_wheel | |
end | |
def maintenance_50k | |
check_break_fluid | |
check_battery_terminals | |
check_engine_oil | |
check_spare_wheel | |
check_gearbox | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment