Displaying 2 results from an estimated 2 matches for "toproc".
Did you mean:
coproc
2006 Jun 11
3
[SUMMARY] Rails Core Weekly June 5 - June 11
..._proc does:
<pre>
{1 => "one", 2 => "two", 3 => "three"}.sort_by(&:first).map(&:last)
#=> ["one", "two", "three"]
</pre>
(Earlier <a href="http://blogs.pragprog.com/cgi-bin/pragdave.cgi/Tech/Ruby/ToProc.rdoc">PragDave</a>
called this "... an incredibly elegant use of coercion and of
closures")
_New Features in trunk (committed)_
David checked in <a
href="http://dev.rubyonrails.org/changeset/4440">uninstall.rb</a> that
makes it possible to uninstall p...
2006 Jul 25
9
Can anyone explain this code? It uses Inject
def webs
@webs ||= Web.find(:all).inject({}) { |webs, web|
webs.merge(web.address => web) }
end
--
Posted via http://www.ruby-forum.com/.