Sha256: f26c6d0fec6c4bc3d55f779082f6e1f442a8ed129a5d90855f712eeb927eb726

Contents?: true

Size: 486 Bytes

Versions: 1

Compression:

Stored size: 486 Bytes

Contents

# frozen_string_literal: true

require 'uffizzi'
require 'uffizzi/auth_helper'

module Uffizzi
  class CLI::Logout
    include ApiClient

    def initialize(options)
      @options = options
    end

    def run
      return Uffizzi.ui.say('You are not logged in') unless Uffizzi::AuthHelper.signed_in?

      server = ConfigFile.read_option(:server)
      destroy_session(server)

      ConfigFile.delete
      Uffizzi.ui.say('You have been successfully logged out')
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
uffizzi-cli-0.6.0 lib/uffizzi/cli/logout.rb