Permalink
Browse files

readme

  • Loading branch information...
1 parent 93e6dd6 commit cf347c6b895a5c523d102223e8575d12e54ba6a9 @Aaron2Ti committed Feb 18, 2012
Showing with 33 additions and 0 deletions.
  1. +33 −0 README.md
View
33 README.md
@@ -0,0 +1,33 @@
+# Memor
+
+## USAGE
+This lib has one utility method called **memor** which takes *__callee__* as
+first argument and all the host methods other arguments, see the following example:
+
+``` ruby
+ require 'memor'
+
+ class Foo
+ include Memor
+
+ def slow_method1
+ memor(__callee__) do
+ # slow stuff
+ end
+ end
+
+ def slow_method2(a, b)
+ memor(__callee__, a, b) do
+ # slow stuff
+ end
+ end
+
+ def slow_method3(a, *args)
+ memor(__callee__, a, args) do
+ # slow stuff
+ end
+ end
+ end
+```
+
+Tested in ruby 1.9.2

0 comments on commit cf347c6

Please sign in to comment.