Sha256: 759949a160e4e1c12ee87f5ad9656d06825a0e45c7c035b4a67b0314245e9932

Contents?: true

Size: 397 Bytes

Versions: 2

Compression:

Stored size: 397 Bytes

Contents

# frozen_string_literal: true

module Uffizzi
  module AuthHelper
    class << self
      def signed_in?
        logged_in = ConfigFile.exists? &&
          ConfigFile.option_exists?(:account_id) &&
          ConfigFile.option_exists?(:cookie) &&
          ConfigFile.option_exists?(:hostname)

        puts 'You are not logged in.' unless logged_in

        logged_in
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
uffizzi-cli-0.1.2 lib/uffizzi/auth_helper.rb
uffizzi-cli-0.1.0 lib/uffizzi/auth_helper.rb