Class: SKP::Key

Inherits:
SubCommandBase show all
Defined in:
lib/skp/cli/key.rb

Instance Method Summary collapse

Methods inherited from SubCommandBase

banner, subcommand_prefix

Instance Method Details

#register(email) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/skp/cli/key.rb', line 4

def register(email)
  unless client.setup?
    say "You have not yet set up the client. Run $ skp start"
    exit(1)
  end
  if client.register_email(email)
    say "Key registered with #{email}. You should receive a Slack invite soon."
  else
    say "Key has already been registered. If you believe this is in error," \
      " please email [email protected]"
  end
end