Skip to content

Instantly share code, notes, and snippets.

@netguru
Created December 9, 2008 09:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save netguru/33852 to your computer and use it in GitHub Desktop.
Save netguru/33852 to your computer and use it in GitHub Desktop.
extend ActiveSupport::Memoizable
def do_some_really_hardcore_calculations(massacrefactor = 1)
(2 + 2) * massacrefactor
end
memoize :do_some_really_hardcore_calculations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment