Sha256: 76089e99b4da6f4246f3f9713a500e2d623df980a278a26d78bd58f22debc33b

Contents?: true

Size: 293 Bytes

Versions: 3

Compression:

Stored size: 293 Bytes

Contents

module Guard

  # Simple interactor that that reads user
  # input from standard input.
  #
  class SimpleInteractor < Interactor

    # Read a line from stdin with Readline.
    #
    def read_line
      while line = $stdin.gets
        process_input(line.chomp)
      end
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
guard-0.9.4 lib/guard/interactors/simple.rb
guard-0.9.3 lib/guard/interactors/simple.rb
guard-0.9.2 lib/guard/interactors/simple.rb