Class: Pgchief::Command::UserList

Inherits:
Base
  • Object
show all
Defined in:
lib/pgchief/command/user_list.rb

Overview

Class to list databases

Instance Attribute Summary

Attributes inherited from Base

#conn, #params

Instance Method Summary collapse

Methods inherited from Base

call, #initialize

Constructor Details

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

Instance Method Details

#callObject



7
8
9
10
11
12
# File 'lib/pgchief/command/user_list.rb', line 7

def call
  prompt = TTY::Prompt.new
  users  = Pgchief::User.all.join("\n")

  prompt.say users
end