Class: Pgai::Encryption::Prompter
- Inherits:
-
Object
- Object
- Pgai::Encryption::Prompter
- Defined in:
- lib/pgai/encryption/prompter.rb
Constant Summary collapse
- DEFAULTS =
{ vault: "employee", category: "API Credential", title: "pgai master key" }.freeze
Instance Method Summary collapse
-
#initialize(shell: Thor::Shell::Basic.new) ⇒ Prompter
constructor
A new instance of Prompter.
- #prompt_for_config ⇒ Object
Constructor Details
#initialize(shell: Thor::Shell::Basic.new) ⇒ Prompter
Returns a new instance of Prompter.
12 13 14 |
# File 'lib/pgai/encryption/prompter.rb', line 12 def initialize(shell: Thor::Shell::Basic.new) @shell = shell end |
Instance Method Details
#prompt_for_config ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/pgai/encryption/prompter.rb', line 16 def prompt_for_config { vault: ask_with_default("Vault", DEFAULTS[:vault]), category: ask_with_default("Category", DEFAULTS[:category]), title: ask_with_default("Title", DEFAULTS[:title]) } end |