Sha256: dae1bfffbaa30936ac54a103d41d44c75c393385f6923f9a4a8c8b6a919858ce

Contents?: true

Size: 502 Bytes

Versions: 5

Compression:

Stored size: 502 Bytes

Contents

module Tr3llo
  class Interface
    def initialize(input, output)
      @input = input
      @output = output
    end

    def print_frame
      print_line("")
      data = yield
      print_line("")
      data
    end

    def print_line(str)
      output.puts(str)
    end

    alias puts print_line

    def print(str)
      output.print(str)
    end

    def print_error(message)
      print_line(Utils.paint(message, "red"))
      print_line("")
    end

    attr_reader :input, :output
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
3llo-1.3.1 lib/3llo/interface.rb
3llo-1.3.1.pre.rc.0 lib/3llo/interface.rb
3llo-1.2.0 lib/3llo/interface.rb
3llo-1.1.0 lib/3llo/interface.rb
3llo-1.0.0 lib/3llo/interface.rb