Class: Torque::PostgreSQL::Segment
- Inherits:
-
Struct
- Object
- Struct
- Torque::PostgreSQL::Segment
- Defined in:
- lib/torque/postgresql/adapter/oid/segment.rb
Instance Attribute Summary collapse
-
#point0 ⇒ Object
Returns the value of attribute point0.
-
#point1 ⇒ Object
Returns the value of attribute point1.
Instance Method Summary collapse
- #x1 ⇒ Object
- #x1=(value) ⇒ Object
- #x2 ⇒ Object
- #x2=(value) ⇒ Object
- #y1 ⇒ Object
- #y1=(value) ⇒ Object
- #y2 ⇒ Object
- #y2=(value) ⇒ Object
Instance Attribute Details
#point0 ⇒ Object
Returns the value of attribute point0
3 4 5 |
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 3 def point0 @point0 end |
#point1 ⇒ Object
Returns the value of attribute point1
3 4 5 |
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 3 def point1 @point1 end |
Instance Method Details
#x1 ⇒ Object
8 9 10 |
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 8 def x1 point0.x end |
#x1=(value) ⇒ Object
4 5 6 |
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 4 def x1=(value) self.point0 = new_point(value, y1) end |
#x2 ⇒ Object
24 25 26 |
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 24 def x2 point1.x end |
#x2=(value) ⇒ Object
20 21 22 |
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 20 def x2=(value) self.point1 = new_point(value, y2) end |
#y1 ⇒ Object
16 17 18 |
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 16 def y1 point0.y end |
#y1=(value) ⇒ Object
12 13 14 |
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 12 def y1=(value) self.point0 = new_point(x1, value) end |
#y2 ⇒ Object
32 33 34 |
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 32 def y2 point1.y end |
#y2=(value) ⇒ Object
28 29 30 |
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 28 def y2=(value) self.point1 = new_point(x2, value) end |