Created
January 22, 2014 21:30
-
-
Save laser/8567714 to your computer and use it in GitHub Desktop.
Stateless Calculator
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 StatelessCalculator | |
def add(x, y) | |
x + y | |
end | |
def div(num, denom) | |
num / denom | |
end | |
module_function :add, :div | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment