lib/reek/cli/reek_command.rb in reek-1.5.1 vs lib/reek/cli/reek_command.rb in reek-1.6.0
- old
+ new
@@ -7,28 +7,24 @@
# A command to collect smells from a set of sources and write them out in
# text report format.
#
class ReekCommand < Command
def execute(app)
- @parser.sources.each do |source|
- reporter.add_examiner(Examiner.new(source, config_files, smell_names))
+ @options.sources.each do |source|
+ reporter.add_examiner Examiner.new(source, smell_names)
end
reporter.smells? ? app.report_smells : app.report_success
reporter.show
end
private
def reporter
- @reporter ||= @parser.reporter
+ @reporter ||= @options.reporter
end
def smell_names
- @smell_names ||= @parser.smells_to_detect
- end
-
- def config_files
- @config_files ||= @parser.config_files
+ @smell_names ||= @options.smells_to_detect
end
end
end
end