What does to_proc method mean in Ruby?
Some methods take a block, and this pattern frequently appears for a block: {|x| x.foo} and people would like to write that in a more concise way. In order to do that they use a combination of: a symbol, the method Symbol#to_proc, implicit class casting, and & operator. If you put & in front of … Read more