Sha256: 87637d316bd1fc7983a93559850acc0d3e4b8d1b9ebefddf46a03ef94f0c803b
Contents?: true
Size: 387 Bytes
Versions: 13
Compression:
Stored size: 387 Bytes
Contents
module Muack class Block attr_accessor :block, :context def initialize block, context=nil self.block, self.context = block, context end def call *args, &actual_block if context # ruby: no way to pass actual_block to instance_exec context.instance_exec(*args, &block) else block.call(*args, &actual_block) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems