Last updated 3 years ago
Was this helpful?
Use to create a callable Method object that can be passed to methods that yield to a block.
Method
def inc(x) x + 1 end [1,2,3].map(&method(:inc)) #=> [2,3,4]
Object#method