lib/phlex/buffered.rb in phlex-0.2.2 vs lib/phlex/buffered.rb in phlex-0.3.0
- old
+ new
@@ -1,19 +1,19 @@
# frozen_string_literal: true
module Phlex
- class Buffered
- def initialize(object, buffer:)
- @object, @buffer = object, buffer
- end
+ class Buffered
+ def initialize(object, buffer:)
+ @object, @buffer = object, buffer
+ end
- def method_missing(name, *args, **kwargs, &block)
- output = @object.public_send(name, *args, **kwargs, &block)
- @buffer << output if output.is_a? String
- nil
- end
+ def method_missing(name, *args, **kwargs, &block)
+ output = @object.public_send(name, *args, **kwargs, &block)
+ @buffer << output if output.is_a? String
+ nil
+ end
- def respond_to_missing?(name)
- @object.respond_to?(name)
- end
- end
+ def respond_to_missing?(name)
+ @object.respond_to?(name)
+ end
+ end
end