Class: Overlaps::Overlap

Inherits:
Object
  • Object
show all
Defined in:
lib/overlaps/overlap.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(start_point, end_point, ids) ⇒ Overlap

Returns a new instance of Overlap.



5
6
7
8
9
# File 'lib/overlaps/overlap.rb', line 5

def initialize(start_point, end_point, ids)
  @start_point = start_point
  @end_point = end_point
  @ids = ids
end

Instance Attribute Details

#end_pointObject

Returns the value of attribute end_point.



3
4
5
# File 'lib/overlaps/overlap.rb', line 3

def end_point
  @end_point
end

#idsObject

Returns the value of attribute ids.



3
4
5
# File 'lib/overlaps/overlap.rb', line 3

def ids
  @ids
end

#start_pointObject

Returns the value of attribute start_point.



3
4
5
# File 'lib/overlaps/overlap.rb', line 3

def start_point
  @start_point
end

Instance Method Details

#rangeObject



11
12
13
# File 'lib/overlaps/overlap.rb', line 11

def range
  (start_point..end_point)
end