class DeadCodeDetector::Configuration

Constants

STORAGE_BACKENDS

Attributes

allowed[RW]
cache_expiry[RW]
classes_to_monitor[RW]
error_handler[RW]
ignore_paths[RW]
max_seconds_to_enable[RW]
redis[RW]

Public Class Methods

new() click to toggle source
# File lib/dead_code_detector/configuration.rb, line 11
def initialize
  @allowed = true
  @classes_to_monitor = []
  @cache_expiry = 60 * 60 * 24 * 14
  @max_seconds_to_enable = 1
end

Public Instance Methods

storage() click to toggle source
# File lib/dead_code_detector/configuration.rb, line 22
def storage
  if @storage
    @storage
  else
    raise "#{self.class.name}#storage is not configured"
  end
end
storage=(backend_type) click to toggle source
# File lib/dead_code_detector/configuration.rb, line 18
def storage=(backend_type)
  @storage ||= STORAGE_BACKENDS.fetch(backend_type).new
end