Class: Gerrit::Input

Inherits:
Object
  • Object
show all
Defined in:
lib/gerrit/input.rb

Overview

Provides interface for collecting input from the user.

Instance Method Summary collapse

Constructor Details

#initialize(input) ⇒ Input

Creates an Gerrit::Input wrapping the given IO stream.

Parameters:

  • input (IO)

    the input stream



7
8
9
# File 'lib/gerrit/input.rb', line 7

def initialize(input)
  @input = input
end

Instance Method Details

#getString?

Blocks until a line of input is returned from the input source.

Returns:

  • (String, nil)


14
15
16
# File 'lib/gerrit/input.rb', line 14

def get
  @input.gets
end