Class: FluidCLI::Commands::Logout

Inherits:
FluidCLI::Command show all
Defined in:
lib/fluid_cli/commands/logout.rb

Instance Attribute Summary

Attributes inherited from FluidCLI::Command

#ctx, #options

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from FluidCLI::Command

call, call_help, #initialize, options, subcommand, subcommand_registry

Constructor Details

This class inherits a constructor from FluidCLI::Command

Class Method Details

.helpObject



15
16
17
# File 'lib/fluid_cli/commands/logout.rb', line 15

def self.help
  "Logs out the current user."
end

Instance Method Details

#callObject



7
8
9
10
11
12
13
# File 'lib/fluid_cli/commands/logout.rb', line 7

def call(*)
  try_delete_development_theme

  FluidCLI::IdentityAuth.delete_tokens_and_keys
  FluidCLI::DB.del(:company) if has_company?
  @ctx.puts("Logged out successfully.")
end