Class: Overlaps::PseudoRange
- Inherits:
-
Object
- Object
- Overlaps::PseudoRange
- Defined in:
- lib/overlaps/pseudo_range.rb
Instance Attribute Summary collapse
-
#end_point ⇒ Object
Returns the value of attribute end_point.
-
#id ⇒ Object
Returns the value of attribute id.
-
#start_point ⇒ Object
Returns the value of attribute start_point.
Instance Method Summary collapse
-
#initialize(range, accessors = {}) ⇒ PseudoRange
constructor
A new instance of PseudoRange.
- #points ⇒ Object
- #range ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(range, accessors = {}) ⇒ PseudoRange
Returns a new instance of PseudoRange.
5 6 7 8 9 |
# File 'lib/overlaps/pseudo_range.rb', line 5 def initialize(range, accessors = {}) verify_input(range, accessors) ensure_points_are_same_class build end |
Instance Attribute Details
#end_point ⇒ Object
Returns the value of attribute end_point.
3 4 5 |
# File 'lib/overlaps/pseudo_range.rb', line 3 def end_point @end_point end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/overlaps/pseudo_range.rb', line 3 def id @id end |
#start_point ⇒ Object
Returns the value of attribute start_point.
3 4 5 |
# File 'lib/overlaps/pseudo_range.rb', line 3 def start_point @start_point end |
Instance Method Details
#points ⇒ Object
11 12 13 |
# File 'lib/overlaps/pseudo_range.rb', line 11 def points [@start_point, @end_point] end |
#range ⇒ Object
15 16 17 |
# File 'lib/overlaps/pseudo_range.rb', line 15 def range (@start_point.value..@end_point.value) end |
#type ⇒ Object
19 20 21 |
# File 'lib/overlaps/pseudo_range.rb', line 19 def type @start_point.value.class end |