Class: Prism::Merge::FileAligner::Boundary
- Inherits:
-
Struct
- Object
- Struct
- Prism::Merge::FileAligner::Boundary
- Defined in:
- lib/prism/merge/file_aligner.rb
Overview
Represents a boundary where files differ
Instance Attribute Summary collapse
-
#dest_range ⇒ Object
Returns the value of attribute dest_range.
-
#next_anchor ⇒ Object
Returns the value of attribute next_anchor.
-
#prev_anchor ⇒ Object
Returns the value of attribute prev_anchor.
-
#template_range ⇒ Object
Returns the value of attribute template_range.
Instance Method Summary collapse
-
#dest_lines ⇒ Array<Integer>
Array of line numbers in destination file within this boundary.
-
#template_lines ⇒ Array<Integer>
Array of line numbers in template file within this boundary.
Instance Attribute Details
#dest_range ⇒ Object
Returns the value of attribute dest_range
30 31 32 |
# File 'lib/prism/merge/file_aligner.rb', line 30 def dest_range @dest_range end |
#next_anchor ⇒ Object
Returns the value of attribute next_anchor
30 31 32 |
# File 'lib/prism/merge/file_aligner.rb', line 30 def next_anchor @next_anchor end |
#prev_anchor ⇒ Object
Returns the value of attribute prev_anchor
30 31 32 |
# File 'lib/prism/merge/file_aligner.rb', line 30 def prev_anchor @prev_anchor end |
#template_range ⇒ Object
Returns the value of attribute template_range
30 31 32 |
# File 'lib/prism/merge/file_aligner.rb', line 30 def template_range @template_range end |
Instance Method Details
#dest_lines ⇒ Array<Integer>
Returns Array of line numbers in destination file within this boundary.
38 39 40 41 |
# File 'lib/prism/merge/file_aligner.rb', line 38 def dest_lines return [] unless dest_range (dest_range.begin..dest_range.end).to_a end |
#template_lines ⇒ Array<Integer>
Returns Array of line numbers in template file within this boundary.
32 33 34 35 |
# File 'lib/prism/merge/file_aligner.rb', line 32 def template_lines return [] unless template_range (template_range.begin..template_range.end).to_a end |