Class: BatchRename::Editor::Result
- Inherits:
-
Object
- Object
- BatchRename::Editor::Result
- Defined in:
- lib/batch_rename/editor/result.rb
Instance Attribute Summary collapse
-
#catalogs ⇒ Object
readonly
Returns the value of attribute catalogs.
Instance Method Summary collapse
- #modified_count ⇒ Object
- #modified_pairs ⇒ Object
- #pairs ⇒ Object
- #to_s ⇒ Object
- #total_count ⇒ Object
Instance Attribute Details
#catalogs ⇒ Object (readonly)
Returns the value of attribute catalogs.
5 6 7 |
# File 'lib/batch_rename/editor/result.rb', line 5 def catalogs @catalogs end |
Instance Method Details
#modified_count ⇒ Object
11 12 13 |
# File 'lib/batch_rename/editor/result.rb', line 11 def modified_count modified_pairs.length end |
#modified_pairs ⇒ Object
19 20 21 |
# File 'lib/batch_rename/editor/result.rb', line 19 def modified_pairs @modified_pairs ||= pairs.select { |a| a.reduce(&:!=) } end |
#pairs ⇒ Object
15 16 17 |
# File 'lib/batch_rename/editor/result.rb', line 15 def pairs @pairs = lines.reduce(&:zip) end |
#to_s ⇒ Object
23 24 25 |
# File 'lib/batch_rename/editor/result.rb', line 23 def to_s pairs.to_s end |
#total_count ⇒ Object
7 8 9 |
# File 'lib/batch_rename/editor/result.rb', line 7 def total_count pairs.length end |