Class: Stable::Utils::Prompts
- Inherits:
-
Object
- Object
- Stable::Utils::Prompts
- Defined in:
- lib/stable/utils/prompts.rb
Overview
User interaction utilities for prompting input
Class Method Summary collapse
Class Method Details
.mysql_root_credentials ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/stable/utils/prompts.rb', line 9 def self.mysql_root_credentials print 'Enter MySQL root username (default: root): ' user = $stdin.gets.strip user = 'root' if user.empty? print 'Enter MySQL root password (leave blank if none): ' password = $stdin.noecho(&:gets).chomp puts { user: user, password: password } end |