module SystemKeychain::Input::ColorConsole
Public Class Methods
ask(prompt)
click to toggle source
# File lib/system_keychain/input/color_console.rb, line 19 def self.ask(prompt) @highline ||= HighLine.new @highline.ask(prompt.blue) end
ask_secret(prompt)
click to toggle source
# File lib/system_keychain/input/color_console.rb, line 24 def self.ask_secret(prompt) @highline ||= HighLine.new @highline.ask("Password: ".blue) { |q| q.echo = '*'*(1+rand(3)) } end
print(s)
click to toggle source
# File lib/system_keychain/input/color_console.rb, line 11 def self.print(s) puts s end
print_error(s)
click to toggle source
# File lib/system_keychain/input/color_console.rb, line 15 def self.print_error(s) puts s.red end
print_important(s)
click to toggle source
# File lib/system_keychain/input/color_console.rb, line 7 def self.print_important(s) puts s.blue end