Sha256: e822f4aa64a6ff9c9697d9083d669562b0fdb82c4b3a8bf1db2f23da5f59f431

Contents?: true

Size: 263 Bytes

Versions: 1

Compression:

Stored size: 263 Bytes

Contents

#!/usr/bin/env ruby

# to_proc.rb
# yesmar@speakeasy.net

module ToProc
  # turn symbol into a simple proc
  def to_proc
    Proc.new { |*args| args.shift.__send__(self, *args) }
  end
end

raise RuntimeError, 'This library is for require only' if $0 == __FILE__

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rex-0.0.4 lib/rex/modules/to_proc.rb