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)

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

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

.read_passwordObject


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

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