lib/reek/smell_warning.rb in kevinrutherford-reek-1.1.3.10 vs lib/reek/smell_warning.rb in kevinrutherford-reek-1.1.3.11

- old
+ new

@@ -1,6 +1,6 @@ -require 'reek/options' +require 'reek/command_line' # SMELL: Global Variable used for options module Reek # # Reports a warning that a smell has been found. @@ -29,9 +29,13 @@ # Returns +true+ only if this is a warning about an instance of # +smell_class+ and its report string matches all of the +patterns+. # def matches?(smell_class, patterns) return false unless smell_class.to_s == @detector.class.class_name + contains_all?(patterns) + end + + def contains_all?(patterns) rpt = report return patterns.all? {|exp| exp === rpt} end def basic_report