Sha256: 14c3de353d36984133399b14488b04ac54c4accb84a36ac2c0a1d0adfcf5ce80
Contents?: true
Size: 197 Bytes
Versions: 89
Compression:
Stored size: 197 Bytes
Contents
require 'ruby2ruby' class Proc def to_ruby(opts={}) Ruby2Ruby.new.process(self.to_sexp).gsub(/proc \{/, "do \n#{opts.map {|k,v| "#{k} \"#{v}\""}.join("\n")}\n").sub(/\}/, "\nend") end end
Version data entries
89 entries across 89 versions & 3 rubygems