Last active
December 22, 2015 20:28
-
-
Save tjhanley/6526335 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
module AnotherCalc | |
def perform(product) | |
case product | |
when "firstcase" | |
do_something | |
when "secondcase" | |
do_something_else | |
when "thirdcase" | |
do_something_more | |
when "fourthcase" | |
do_something_even_more_different | |
end | |
end | |
end |
This file contains hidden or 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
module BizCalc | |
def rule_1(product) | |
end | |
def rule_2(product) | |
end | |
def rule_3(product) | |
result = some_shared_function(x) | |
end | |
def rule_4(product) | |
result = some_shared_function(x) | |
end | |
def some_shared_function(vals) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment