Class: Hiera::Backend::Eyaml::HighlineHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/hiera/backend/eyaml/highlinehelper.rb

Class Method Summary collapse

Class Method Details

.confirm?(message) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
14
15
16
17
18
# File 'lib/hiera/backend/eyaml/highlinehelper.rb', line 11

def self.confirm?(message)
  result = ask("#{message} (y/N): ")
  if result.downcase == 'y' or result.downcase == 'yes'
    true
  else
    false
  end
end

.read_passwordObject



7
8
9
# File 'lib/hiera/backend/eyaml/highlinehelper.rb', line 7

def self.read_password
  ask('Enter password: ') { |q| q.echo = '*' }
end