Sha256: 4048b3296cf376a87ad030219920dff187a31bbf6239029ce97a0dd3b0ce2dc5

Contents?: true

Size: 298 Bytes

Versions: 3

Compression:

Stored size: 298 Bytes

Contents

#
# h2. extensions/symbol.rb -- extensions to symbol class
#
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 unless method_defined?(:to_proc)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wukong-3.0.0.pre old/wukong/extensions/symbol.rb
wukong-2.0.2 lib/wukong/extensions/symbol.rb
wukong-2.0.1 lib/wukong/extensions/symbol.rb