class KafoWizards::HighLine::PasswordRenderer

Public Instance Methods

render_action(entry) click to toggle source
# File lib/kafo_wizards/highline/password_renderer.rb, line 9
def render_action(entry)
  password = ask("Enter new password: ") { |q| q.echo = "*" }
  if !entry.confirmation_required?
    entry.update(:password => password)
  else
    password_confirmation = ask("Re-type new password: ") { |q| q.echo = "*" }
    entry.update(:password => password, :password_confirmation => password_confirmation)
  end
  nil
end
render_value(entry) click to toggle source
# File lib/kafo_wizards/highline/password_renderer.rb, line 5
def render_value(entry)
  "#{::HighLine.color("**********", :blue)}"
end