public
Fork of vitaly/lazyeval
Description: A very simple lazy evaluation for Ruby
Homepage: http://lazyeval.rubyforge.org/
Clone URL: git://github.com/taasaa/lazyeval.git
Vitaly Kushner (author)
Wed Apr 23 17:07:12 -0700 2008
name age message
file .gitignore Tue Apr 22 15:26:30 -0700 2008 cleanup [Vitaly Kushner]
file History.txt Tue Apr 22 14:40:08 -0700 2008 initial 'newgem lazyeval' [Vitaly Kushner]
file License.txt Tue Apr 22 15:26:54 -0700 2008 gem config [Vitaly Kushner]
file Manifest.txt Tue Apr 22 14:40:08 -0700 2008 initial 'newgem lazyeval' [Vitaly Kushner]
file README.txt Wed Apr 23 17:05:16 -0700 2008 README [Vitaly Kushner]
file Rakefile Tue Apr 22 14:40:08 -0700 2008 initial 'newgem lazyeval' [Vitaly Kushner]
directory config/ Tue Apr 22 15:26:54 -0700 2008 gem config [Vitaly Kushner]
directory doc/ Wed Apr 23 17:07:12 -0700 2008 website/ [Vitaly Kushner]
directory lib/ Wed Apr 23 17:04:28 -0700 2008 initial lazyeval.rb import [Vitaly Kushner]
directory log/ Tue Apr 22 14:40:08 -0700 2008 initial 'newgem lazyeval' [Vitaly Kushner]
directory script/ Tue Apr 22 14:40:08 -0700 2008 initial 'newgem lazyeval' [Vitaly Kushner]
file setup.rb Tue Apr 22 14:40:08 -0700 2008 initial 'newgem lazyeval' [Vitaly Kushner]
directory tasks/ Tue Apr 22 14:40:08 -0700 2008 initial 'newgem lazyeval' [Vitaly Kushner]
directory test/ Tue Apr 22 14:40:08 -0700 2008 initial 'newgem lazyeval' [Vitaly Kushner]
directory website/ Wed Apr 23 17:07:12 -0700 2008 website/ [Vitaly Kushner]
README.txt
== Lazyeval

* http://github.com/vitaly/lazyeval/

== DESCRIPTION

This GEM allows to call methods lazily. i.e. the actual work will not be
performed until the result is used.  There's no promise/force semantics. just a
single call (or block) is stored and executed the first time the (lazy) result
is accessed.

== EXAMPLES OF USAGE


# simple lazy call
user = User.lazy.find(:first) # will not access a db
puts user.name # this will actually perform the find and then get the name from
               # the result

# example for a lazy block
user_name = User.lazy { |user| user.find(:first).user_name } # no db access
puts user_name # db will be accessed here