Class: Symbol

Inherits:
Object
  • Object
show all
Defined in:
lib/imw/utils/extensions/symbol.rb

Instance Method Summary collapse

Instance Method Details

#handleObject

Returns the symbol itself (for compatibility with String.uniqnae and so on.



11
12
13
# File 'lib/imw/utils/extensions/symbol.rb', line 11

def handle
  self
end

#to_procObject

Turn the symbol into a simple proc (stolen from ActiveSupport::CoreExtensions::Symbol).



5
6
7
# File 'lib/imw/utils/extensions/symbol.rb', line 5

def to_proc
  Proc.new { |*args| args.shift.__send__(self, *args) }
end