This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
every /
| name | age | message | |
|---|---|---|---|
| |
LICENSE | Sun Mar 15 22:34:46 -0700 2009 | |
| |
Manifest | Wed Nov 04 06:19:15 -0800 2009 | |
| |
README | Wed Apr 01 21:49:37 -0700 2009 | |
| |
Rakefile | Wed Nov 04 06:38:57 -0800 2009 | |
| |
TODO | Mon Mar 16 07:06:29 -0700 2009 | |
| |
benchmarks.rb | Wed Apr 08 17:00:59 -0700 2009 | |
| |
every.gemspec | Wed Nov 04 08:06:24 -0800 2009 | |
| |
examples.rb | Tue May 19 13:20:16 -0700 2009 | |
| |
lib/ | Wed Nov 04 06:47:25 -0800 2009 | |
| |
test/ | Wed Nov 04 06:51:00 -0800 2009 |
README
Symbol#to_proc's hot cousin. Simple and elegant alternative to using &:method with enumerables.
compare:
enum = [1.4, 2.4 ,3.4]
enum.map {|i| i.floor } #=> [1, 2, 3]
enum.map(&:floor) #=> [1, 2, 3]
enum.every.floor #=> [1, 2, 3]
arguments? sure:
%w( axb dxf ).every.gsub(/x/,'y') #=> ['ayb', 'dyf']
%w( axb dxf ).every.gsub(/x/) { 'y' } #=> ['ayb', 'dyf']







