class Arcanus::Input
Provides interface for collecting input from the user.
Public Class Methods
new(input)
click to toggle source
Creates an {Arcanus::Input} wrapping the given IO stream.
@param [IO] input the input stream
# File lib/arcanus/input.rb, line 9 def initialize(input) @input = input end
Public Instance Methods
get(noecho: false)
click to toggle source
Blocks until a line of input is returned from the input source.
@return [String, nil]
# File lib/arcanus/input.rb, line 16 def get(noecho: false) if noecho @input.noecho(&:gets) else @input.gets end end