Sha256: f568f89cbf0d2a7464852cb0abe0d5255efe1d441a798cfe03c49642b3631623
Contents?: true
Size: 807 Bytes
Versions: 28
Compression:
Stored size: 807 Bytes
Contents
# frozen_string_literal: true require_relative './configuration_validator' module Reek module Configuration # # Hash extension for the default directive. # module DefaultDirective include ConfigurationValidator # Adds the configuration for detectors as default directive. # # @param detectors_configuration [Hash] the configuration e.g.: # { # :IrresponsibleModule => {:enabled=>false}, # :Attribute => {:enabled=>true} # } # # @return [self] def add(detectors_configuration) detectors_configuration.each do |name, configuration| detector = key_to_smell_detector(name) self[detector] = (self[detector] || {}).merge configuration end self end end end end
Version data entries
28 entries across 26 versions & 2 rubygems