Class: Pgchief::Prompt::ViewDatabaseConnectionString
- Defined in:
- lib/pgchief/prompt/view_database_connection_string.rb
Overview
Class to ask for database names, in order to create it
Instance Attribute Summary
Attributes inherited from Base
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
#call ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/pgchief/prompt/view_database_connection_string.rb', line 7 def call username = params.first || select_user database = prompt.select("Database you're connecting to:", Pgchief::Database.all + ['None']) database = nil if database == 'None' result = Pgchief::Command::RetrieveConnectionString.call(username, database) prompt.say result end |