Sha256: 3659ff55c36601af4f7fc6942160a3865cfc76461941b1b670032eb19ef44654

Contents?: true

Size: 324 Bytes

Versions: 18

Compression:

Stored size: 324 Bytes

Contents

class Symbol

  # Turn the symbol into a simple proc (stolen from
  # <tt>ActiveSupport::CoreExtensions::Symbol</tt>).
  def to_proc
    Proc.new { |*args| args.shift.__send__(self, *args) }
  end

  # Returns the symbol itself (for compatibility with
  # <tt>String.uniqnae</tt> and so on.
  def handle
    self
  end

end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
imw-0.2.17 lib/imw/utils/extensions/symbol.rb
imw-0.2.16 lib/imw/utils/extensions/symbol.rb
imw-0.2.15 lib/imw/utils/extensions/symbol.rb
imw-0.2.14 lib/imw/utils/extensions/symbol.rb
imw-0.2.13 lib/imw/utils/extensions/symbol.rb
imw-0.2.12 lib/imw/utils/extensions/symbol.rb
imw-0.2.11 lib/imw/utils/extensions/symbol.rb
imw-0.2.10 lib/imw/utils/extensions/symbol.rb
imw-0.2.9 lib/imw/utils/extensions/symbol.rb
imw-0.2.8 lib/imw/utils/extensions/symbol.rb
imw-0.2.7 lib/imw/utils/extensions/symbol.rb
imw-0.2.6 lib/imw/utils/extensions/symbol.rb
imw-0.2.5 lib/imw/utils/extensions/symbol.rb
imw-0.2.4 lib/imw/utils/extensions/symbol.rb
imw-0.2.3 lib/imw/utils/extensions/symbol.rb
imw-0.2.2 lib/imw/utils/extensions/symbol.rb
imw-0.2.1 lib/imw/utils/extensions/symbol.rb
imw-0.2.0 lib/imw/utils/extensions/symbol.rb