Class: Pcli::Services::Commands::Login
- Inherits:
-
Dry::CLI::Command
- Object
- Dry::CLI::Command
- Pcli::Services::Commands::Login
- Defined in:
- lib/pcli/services/commands/login.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/pcli/services/commands/login.rb', line 9 def call(*) if api.token && !prompt.yes?('You are already logged in. Would you like to log out?') output.puts('Aborted.') return end authenticate.run(true) CommandOutput.continue end |