class PasswordExpirationNotifier::CLI

Public Instance Methods

list() click to toggle source
# File lib/password_expiration_notifier/cli.rb, line 37
def list()
  users = fetch_users(config(options))
  show_list(users)
end
notify() click to toggle source
# File lib/password_expiration_notifier/cli.rb, line 65
def notify()
  conf = config(options)
  users = fetch_users(conf)
  slack = PasswordExpirationNotifier::Slack.new(conf)
  users.each do |user|
    message = slack.notify_to(user)
    puts message if options[:verbose]
  end
end