Class: Symbol

Inherits:
Object show all
Defined in:
lib/babushka/core_patches/symbol.rb

Instance Method Summary collapse

Instance Method Details

#to_procObject

Returns a Proc object which responds to a method whose name is this symbol.

This is a fallback implementation for older rubies that don’t have a built-in Symbol#to_proc.



8
9
10
# File 'lib/babushka/core_patches/symbol.rb', line 8

def to_proc
  L{|*args| args.shift.__send__ self, *args }
end