Sha256: 68219fb9f82c06f91a10012081c6771e9a060815a475aaf07b4ec56255814a63

Contents?: true

Size: 362 Bytes

Versions: 20

Compression:

Stored size: 362 Bytes

Contents

require "stringio"

module Lapidarius
  class UI
    def initialize
      @io = StringIO.new
    end

    def say(statement)
      @io.puts statement
    end

    def out
      @io.string.strip
    end

    def clear!
      @io.reopen("")
    end
 
    # mock method invocked by Gem::UserInteraction module
    def terminate_interaction(code = 0); end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
lapidarius-4.5.7 lib/lapidarius/ui.rb
lapidarius-4.5.6 lib/lapidarius/ui.rb
lapidarius-4.5.5 lib/lapidarius/ui.rb
lapidarius-4.4.4 lib/lapidarius/ui.rb
lapidarius-4.4.3 lib/lapidarius/ui.rb
lapidarius-4.4.2 lib/lapidarius/ui.rb
lapidarius-4.3.0 lib/lapidarius/ui.rb
lapidarius-4.2.1 lib/lapidarius/ui.rb
lapidarius-4.2.0 lib/lapidarius/ui.rb
lapidarius-4.1.1 lib/lapidarius/ui.rb
lapidarius-4.1.0 lib/lapidarius/ui.rb
lapidarius-4.0.1 lib/lapidarius/ui.rb
lapidarius-3.4.0 lib/lapidarius/ui.rb
lapidarius-3.3.0 lib/lapidarius/ui.rb
lapidarius-3.2.1 lib/lapidarius/ui.rb
lapidarius-3.2.0 lib/lapidarius/ui.rb
lapidarius-3.1.2 lib/lapidarius/ui.rb
lapidarius-3.1.1 lib/lapidarius/ui.rb
lapidarius-3.1.0 lib/lapidarius/ui.rb
lapidarius-2.1.2 lib/lapidarius/ui.rb