lib/reek/smells/smell_detector.rb in reek-1.3.1 vs lib/reek/smells/smell_detector.rb in reek-1.3.2
- old
+ new
@@ -1,19 +1,16 @@
require 'set'
-require File.join(File.dirname(File.dirname(File.expand_path(__FILE__))), 'smell_warning')
-require File.join(File.dirname(File.dirname(File.expand_path(__FILE__))), 'core', 'smell_configuration')
+require 'reek/smell_warning'
+require 'reek/core/smell_configuration'
module Reek
module Smells
module ExcludeInitialize
def self.default_config
super.adopt(EXCLUDE_KEY => ['initialize'])
end
- def initialize(source, config = self.class.default_config)
- super(source, config)
- end
end
#
# Shared responsibilities of all smell detectors.
#
@@ -34,10 +31,10 @@
end
def default_config
{
Core::SmellConfiguration::ENABLED_KEY => true,
- EXCLUDE_KEY => DEFAULT_EXCLUDE_SET
+ EXCLUDE_KEY => DEFAULT_EXCLUDE_SET.dup
}
end
end
attr_reader :smells_found # SMELL: only published for tests