Class: SuperDiff::Core::TieredLinesElider::Box

Inherits:
Object
  • Object
show all
Defined in:
lib/super_diff/core/tiered_lines_elider.rb

Instance Method Summary collapse

Instance Method Details

#extend_to(new_end) ⇒ Object



439
440
441
# File 'lib/super_diff/core/tiered_lines_elider.rb', line 439

def extend_to(new_end)
  @range = range.begin..new_end
end

#extended_to(new_end) ⇒ Object



435
436
437
# File 'lib/super_diff/core/tiered_lines_elider.rb', line 435

def extended_to(new_end)
  dup.tap { |clone| clone.extend_to(new_end) }
end

#fits_fully_within?(other) ⇒ Boolean

Returns:

  • (Boolean)


431
432
433
# File 'lib/super_diff/core/tiered_lines_elider.rb', line 431

def fits_fully_within?(other)
  other.range.begin <= range.begin && other.range.end >= range.end
end

#fully_contains?(other) ⇒ Boolean

Returns:

  • (Boolean)


427
428
429
# File 'lib/super_diff/core/tiered_lines_elider.rb', line 427

def fully_contains?(other)
  range.begin <= other.range.begin && range.end >= other.range.end
end