Sha256: 9f28785a3910344d360801709b94a6536c84df98f0dba9b8c623d1055ec7f5ed

Contents?: true

Size: 287 Bytes

Versions: 2

Compression:

Stored size: 287 Bytes

Contents

require "stringio"

module Textbringer
  class DefaultOutput
    def write(*args)
      Buffer.current.insert(args.join)
    end

    def flush
    end

    def method_missing(mid, ...)
      buffer = StringIO.new
      buffer.send(mid, ...)
      write(buffer.string)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
textbringer-1.4.1 lib/textbringer/default_output.rb
textbringer-1.3.0 lib/textbringer/default_output.rb