Class: DontRepeatYourself::SimianResults::DuplicateLinesSet
- Inherits:
-
Object
- Object
- DontRepeatYourself::SimianResults::DuplicateLinesSet
- Defined in:
- lib/dont_repeat_yourself/simian_results.rb
Instance Attribute Summary collapse
-
#blocks ⇒ Object
readonly
Returns the value of attribute blocks.
-
#number_of_duplicate_lines ⇒ Object
readonly
Returns the value of attribute number_of_duplicate_lines.
Instance Method Summary collapse
-
#initialize(original_set) ⇒ DuplicateLinesSet
constructor
A new instance of DuplicateLinesSet.
- #sentence_found_x_duplicate_lines_in_the_following_files ⇒ Object
Constructor Details
#initialize(original_set) ⇒ DuplicateLinesSet
Returns a new instance of DuplicateLinesSet.
56 57 58 59 60 61 |
# File 'lib/dont_repeat_yourself/simian_results.rb', line 56 def initialize(original_set) @number_of_duplicate_lines = original_set["lineCount"] @blocks = original_set["blocks"].collect{ |original_block| DontRepeatYourself::SimianResults::DuplicateLinesBlock.new(original_block) } end |
Instance Attribute Details
#blocks ⇒ Object (readonly)
Returns the value of attribute blocks.
55 56 57 |
# File 'lib/dont_repeat_yourself/simian_results.rb', line 55 def blocks @blocks end |
#number_of_duplicate_lines ⇒ Object (readonly)
Returns the value of attribute number_of_duplicate_lines.
55 56 57 |
# File 'lib/dont_repeat_yourself/simian_results.rb', line 55 def number_of_duplicate_lines @number_of_duplicate_lines end |
Instance Method Details
#sentence_found_x_duplicate_lines_in_the_following_files ⇒ Object
63 64 65 |
# File 'lib/dont_repeat_yourself/simian_results.rb', line 63 def sentence_found_x_duplicate_lines_in_the_following_files "Found #{@number_of_duplicate_lines} duplicate lines in the following files:" end |