Class: IO

Inherits:
Object
  • Object
show all
Defined in:
lib/cem_acpt/provision/terraform/terraform_cmd.rb

Overview

IO monkey patch for non-blocking readline

Instance Method Summary collapse

Instance Method Details

#readline_nonblockObject



153
154
155
156
157
158
159
160
# File 'lib/cem_acpt/provision/terraform/terraform_cmd.rb', line 153

def readline_nonblock
  rlnb = []
  while (ch = read_nonblock(1))
    rlnb << ch
    break if ch == "\n"
  end
  rlnb.join
end