Class: SuperDiff::Core::TieredLinesElider::Box
- Inherits:
-
Object
- Object
- SuperDiff::Core::TieredLinesElider::Box
- Defined in:
- lib/super_diff/core/tiered_lines_elider.rb
Instance Method Summary collapse
- #extend_to(new_end) ⇒ Object
- #extended_to(new_end) ⇒ Object
- #fits_fully_within?(other) ⇒ Boolean
- #fully_contains?(other) ⇒ Boolean
Instance Method Details
#extend_to(new_end) ⇒ Object
416 417 418 |
# File 'lib/super_diff/core/tiered_lines_elider.rb', line 416 def extend_to(new_end) @range = range.begin..new_end end |
#extended_to(new_end) ⇒ Object
412 413 414 |
# File 'lib/super_diff/core/tiered_lines_elider.rb', line 412 def extended_to(new_end) dup.tap { |clone| clone.extend_to(new_end) } end |
#fits_fully_within?(other) ⇒ Boolean
408 409 410 |
# File 'lib/super_diff/core/tiered_lines_elider.rb', line 408 def fits_fully_within?(other) other.range.begin <= range.begin && other.range.end >= range.end end |
#fully_contains?(other) ⇒ Boolean
404 405 406 |
# File 'lib/super_diff/core/tiered_lines_elider.rb', line 404 def fully_contains?(other) range.begin <= other.range.begin && range.end >= other.range.end end |