Sha256: c19bc4b9d754a50d937ec3887a50a0a48f8432857b88217cbb597850b71851b9
Contents?: true
Size: 236 Bytes
Versions: 39
Compression:
Stored size: 236 Bytes
Contents
module Scope def scope(method_name, proc) singleton_class.class_eval do params = Reparameterize.call(proc.parameters) block = eval("lambda { |#{params}| }") define_method(method_name, block) end end end
Version data entries
39 entries across 39 versions & 1 rubygems