Sha256: c481217df93e64fd7fe73feac47cecdb610bb45def78b8951c0f0c0477c7ea44
Contents?: true
Size: 396 Bytes
Versions: 6
Compression:
Stored size: 396 Bytes
Contents
# frozen_string_literal: true require "delegate" module Phlex class Buffered < SimpleDelegator def initialize(object, buffer:) super(object) @buffer = buffer end # Alias output methods to this def __output_method__(*args, **kwargs, &block) output = __getobj__.public_send(__callee__, *args, **kwargs, &block) @buffer << output if output.is_a? String nil end end end
Version data entries
6 entries across 6 versions & 1 rubygems