Sha256: f6e4b930fa18c0aae9293e01129000dc4d82a0af8fc92dad14d154c7ac128aeb

Contents?: true

Size: 602 Bytes

Versions: 21

Compression:

Stored size: 602 Bytes

Contents

# frozen_string_literal: true
require 'logger'

# Main
module ProxyRb
  @debug_mode = false
  @logger     = Logger.new($stderr)

  class << self
    protected

    attr_accessor :debug_mode

    public

    attr_reader :logger

    def debug_mode_enabled?
      debug_mode == true
    end

    def enable_debug_mode
      self.debug_mode = true
      %w(pry byebug).each { |l| require l }
    end

    def require_files_matching_pattern(pattern)
      root = File.expand_path('../', __FILE__)
      path = File.join(root, pattern)
      Dir.glob(path).each { |f| require_relative f }
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
proxy_rb-0.10.4 lib/proxy_rb/main.rb
proxy_rb-0.10.3 lib/proxy_rb/main.rb
proxy_rb-0.10.2 lib/proxy_rb/main.rb
proxy_rb-0.10.1 lib/proxy_rb/main.rb
proxy_rb-0.10.0 lib/proxy_rb/main.rb
proxy_rb-0.9.3 lib/proxy_rb/main.rb
proxy_rb-0.9.2 lib/proxy_rb/main.rb
proxy_rb-0.9.1 lib/proxy_rb/main.rb
proxy_rb-0.9.0 lib/proxy_rb/main.rb
proxy_rb-0.8.3 lib/proxy_rb/main.rb
proxy_rb-0.8.2 lib/proxy_rb/main.rb
proxy_rb-0.8.1 lib/proxy_rb/main.rb
proxy_rb-0.8.0 lib/proxy_rb/main.rb
proxy_rb-0.7.1 lib/proxy_rb/main.rb
proxy_rb-0.7.0 lib/proxy_rb/main.rb
proxy_rb-0.6.0 lib/proxy_rb/main.rb
proxy_rb-0.5.0 lib/proxy_rb/main.rb
proxy_rb-0.4.0 lib/proxy_rb/main.rb
proxy_rb-0.3.0 lib/proxy_rb/main.rb
proxy_rb-0.2.1 lib/proxy_rb/main.rb