Class: Pgchief::Prompt::Start

Inherits:
Base
  • Object
show all
Defined in:
lib/pgchief/prompt/start.rb

Overview

Kicks off the CLI with an initial prompt

Instance Attribute Summary

Attributes inherited from Base

#params

Instance Method Summary collapse

Methods inherited from Base

call, #initialize, #klassify, #prompt, #yes_or_no

Constructor Details

This class inherits a constructor from Pgchief::Prompt::Base

Instance Method Details

#callObject



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/pgchief/prompt/start.rb', line 7

def call
  manage_config!

  result = prompt.select(
    'Welcome! How can I help?',
    [
      'Database management',
      'User management'
    ]
  )

  klassify('prompt', result).call
end