Class: Overlaps::Point
- Inherits:
-
Object
- Object
- Overlaps::Point
- Includes:
- Comparable
- Defined in:
- lib/overlaps/point.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #<=>(other_point) ⇒ Object
- #end? ⇒ Boolean
-
#initialize(value, id) ⇒ Point
constructor
A new instance of Point.
- #start? ⇒ Boolean
Constructor Details
#initialize(value, id) ⇒ Point
Returns a new instance of Point.
7 8 9 10 |
# File 'lib/overlaps/point.rb', line 7 def initialize(value, id) @value = value @id = id end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/overlaps/point.rb', line 5 def id @id end |
#value ⇒ Object
Returns the value of attribute value.
5 6 7 |
# File 'lib/overlaps/point.rb', line 5 def value @value end |
Instance Method Details
#<=>(other_point) ⇒ Object
20 21 22 |
# File 'lib/overlaps/point.rb', line 20 def <=>(other_point) value <=> other_point.value end |
#end? ⇒ Boolean
16 17 18 |
# File 'lib/overlaps/point.rb', line 16 def end? false end |
#start? ⇒ Boolean
12 13 14 |
# File 'lib/overlaps/point.rb', line 12 def start? false end |