Skip to content

Instantly share code, notes, and snippets.

@laser
Created January 27, 2014 20:05
Show Gist options
  • Save laser/8656191 to your computer and use it in GitHub Desktop.
Save laser/8656191 to your computer and use it in GitHub Desktop.
module as namespace
# 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