module Block2Method

Constants

VERSION

Public Class Methods

convert(&block) click to toggle source
# File lib/block2method.rb, line 16
def self.convert(&block)
  name = Thread.current.object_id.to_s.to_sym
  define_method(name, &block)
  block = instance_method(name)
  remove_method(name)
  block
end