class OneSecret::KeyResolution::Stdin

Public Class Methods

new(output = STDOUT, input = STDIN) click to toggle source
# File lib/one_secret/key_resolution.rb, line 36
def initialize(output = STDOUT, input = STDIN)
  @output = output
  @input = input
end

Public Instance Methods

key() click to toggle source
# File lib/one_secret/key_resolution.rb, line 41
def key
  @output.print OneSecret.message("Please enter your secret key: ")
  key = @input.noecho(&:gets).chomp
  @output.puts
  key unless key.blank?
end