class Symbol
Symbol
monkey patch to allow map(&:method) to take arguments. Allows: [2,3].map(&:+.with(10)) # => [12,13] See: stackoverflow.com/questions/23695653/can-you-supply-arguments-to-the-mapmethod-syntax-in-ruby for more information,
Public Instance Methods
with(*args, &block)
click to toggle source
# File lib/libis/tools/extend/symbol.rb, line 5 def with(*args, &block) ->(caller, *rest) { caller.public_send(self, *rest, *args, &block) } end