Skip to content

Instantly share code, notes, and snippets.

@laser
Created January 22, 2014 21:30
Show Gist options
  • Save laser/8567714 to your computer and use it in GitHub Desktop.
Save laser/8567714 to your computer and use it in GitHub Desktop.
Stateless Calculator
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