Sha256: 53e364cab4fc29d6d52aab0b5354c98ca9794efe92bb84e407097a3e2ed0a541
Contents?: true
Size: 507 Bytes
Versions: 50
Compression:
Stored size: 507 Bytes
Contents
module Datadog # Represents an wrapped method, with a reference to the original block # and the block that wraps around it. class MethodWrapper attr_reader \ :original, :wrapper DEFAULT_WRAPPER = proc { |original, *args, &block| original.call(*args, &block) } def initialize(original, &block) @original = original @wrapper = block_given? ? block : DEFAULT_WRAPPER end def call(*args, &block) wrapper.call(original, *args, &block) end end end
Version data entries
50 entries across 50 versions & 2 rubygems