Created
January 27, 2014 20:05
-
-
Save laser/8656191 to your computer and use it in GitHub Desktop.
module as namespace
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
# app/utils/calculator.rb | |
module StatelessCalculator | |
def add(x, y) | |
x + y | |
end | |
module_function :add | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment