Class: DontRepeatYourself::RubyProjectReporter
- Inherits:
-
ProjectReporterBase
- Object
- ProjectReporterBase
- DontRepeatYourself::RubyProjectReporter
- Defined in:
- lib/dont_repeat_yourself/reporter.rb
Instance Attribute Summary
Attributes inherited from ProjectReporterBase
#maximum_number_of_duplicate_lines_i_want_in_my_project, #name, #report_type
Instance Method Summary collapse
- #configure_simian ⇒ Object
-
#initialize(project_path) ⇒ RubyProjectReporter
constructor
A new instance of RubyProjectReporter.
Methods inherited from ProjectReporterBase
#description, #dry?, #failure_message, #ignoring_the_file, #patterns_of_directories_to_search_for_duplicate_lines, #report, #with_threshold_of_duplicate_lines
Constructor Details
#initialize(project_path) ⇒ RubyProjectReporter
Returns a new instance of RubyProjectReporter.
84 85 86 87 |
# File 'lib/dont_repeat_yourself/reporter.rb', line 84 def initialize(project_path) super(basename_of_directory(project_path)) @simian_runner.basedir = project_path end |
Instance Method Details
#configure_simian ⇒ Object
89 90 91 92 93 94 |
# File 'lib/dont_repeat_yourself/reporter.rb', line 89 def configure_simian # Only add the "lib" directoy if exists @simian_runner.add_ruby_directory_to_search_for_duplicate_lines("lib") @simian_runner.add_ruby_directory_to_search_for_duplicate_lines("test") if folder_exists?("test") @simian_runner.add_ruby_directory_to_search_for_duplicate_lines("spec") if folder_exists?("spec") end |