module Gemmy::Patches::SymbolPatch::InstanceMethods::With
Patch symbol so the proc shorthand can take extra arguments stackoverflow.com/a/23711606/2981429
Example: [1,2,3].map &:*.with(2)
> [2,4,6]¶ ↑
Public Instance Methods
with(*args, &block)
click to toggle source
# File lib/gemmy/patches/symbol_patch.rb, line 36 def with(*args, &block) ->(caller, *rest) { caller.send(self, *rest, *args, &block) } end