Sha256: 6c55b0683f74d34891c7d72d30eae6ef001d9344e05df7492ab7f81743b03d60

Contents?: true

Size: 565 Bytes

Versions: 5

Compression:

Stored size: 565 Bytes

Contents

# encoding: utf-8
module LocalPac
  @config    = LocalPac::Config.new
  @ui_logger = LocalPac::UiLogger.new

  class << self
    attr_accessor :debug_mode, :config, :ui_logger

    def enable_debug_mode
      LocalPac.ui_logger.info "Activating debug mode."

      require 'pry'
      require 'debugger'
    rescue LoadError
      LocalPac.ui_logger.error "You tried to enable debug-mode, but either 'pry'- or 'debugger'-gem are not installed. Please fix that before using the debug-switch again."
    end

    def error_id
      SecureRandom.hex
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
local_pac-0.6.3 lib/local_pac/main.rb
local_pac-0.6.2 lib/local_pac/main.rb
local_pac-0.6.1 lib/local_pac/main.rb
local_pac-0.5.0 lib/local_pac/main.rb
local_pac-0.4.0 lib/local_pac/main.rb