Class: Pgai::Encryption::Prompter

Inherits:
Object
  • Object
show all
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

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_configObject



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