Class: Range
- Inherits:
-
Object
- Object
- Range
- Defined in:
- lib/ucsc.rb
Instance Method Summary collapse
Instance Method Details
#contained_by?(other_range) ⇒ Boolean
7 8 9 10 11 12 13 |
# File 'lib/ucsc.rb', line 7 def contained_by?(other_range) if self.begin > other_range.begin and self.end < other_range.end return true else return false end end |
#overlaps_with?(other_range) ⇒ Boolean
15 16 17 18 19 20 21 |
# File 'lib/ucsc.rb', line 15 def overlaps_with?(other_range) if ((self.begin >= other_range.begin and self.begin <= other_range.end) or (other_range.begin >= self.begin and other_range.begin <= self.end)) return true else return false end end |