5 July 2007
andIn Ruby the & character maps to the to_proc method. In this episode Manfred shows what you can do with it and how it works.
5 July 2007
andIn Ruby the & character maps to the to_proc method. In this episode Manfred shows what you can do with it and how it works.
# Symbol#to_proc is defined in Rails and will be part of Ruby 1.9
lambda { |*args| args.shift.__send__(self, *args) }
end
end