Class: ShopifyCli::Commands::Logout
- Inherits:
-
ShopifyCli::Command
- Object
- CLI::Kit::BaseCommand
- ShopifyCli::Command
- ShopifyCli::Commands::Logout
- Defined in:
- lib/shopify-cli/commands/logout.rb
Constant Summary collapse
- LOGIN_TOKENS =
[ :identity_access_token, :identity_refresh_token, :identity_exchange_token, :admin_access_token, :admin_refresh_token, :admin_exchange_token ]
Instance Attribute Summary
Attributes inherited from ShopifyCli::Command
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from ShopifyCli::Command
call, call_help, #initialize, options, prerequisite_task, run_prerequisites, subcommand, subcommand_registry
Methods included from Feature::Set
Constructor Details
This class inherits a constructor from ShopifyCli::Command
Class Method Details
.help ⇒ Object
18 19 20 |
# File 'lib/shopify-cli/commands/logout.rb', line 18 def self.help ShopifyCli::Context.('core.logout.help', ShopifyCli::TOOL_NAME) end |
Instance Method Details
#call ⇒ Object
11 12 13 14 15 16 |
# File 'lib/shopify-cli/commands/logout.rb', line 11 def call(*) LOGIN_TOKENS.each do |token| ShopifyCli::DB.del(token) if ShopifyCli::DB.exists?(token) end @ctx.puts(@ctx.('core.logout.success')) end |