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
5 6 7 |
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 5 def point0 @point0 end |
#point1 ⇒ Object
Returns the value of attribute point1
5 6 7 |
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 5 def point1 @point1 end |
Instance Method Details
#x1 ⇒ Object
10 11 12 |
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 10 def x1 point0.x end |
#x1=(value) ⇒ Object
6 7 8 |
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 6 def x1=(value) self.point0 = new_point(value, y1) end |
#x2 ⇒ Object
26 27 28 |
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 26 def x2 point1.x end |
#x2=(value) ⇒ Object
22 23 24 |
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 22 def x2=(value) self.point1 = new_point(value, y2) end |
#y1 ⇒ Object
18 19 20 |
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 18 def y1 point0.y end |
#y1=(value) ⇒ Object
14 15 16 |
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 14 def y1=(value) self.point0 = new_point(x1, value) end |
#y2 ⇒ Object
34 35 36 |
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 34 def y2 point1.y end |
#y2=(value) ⇒ Object
30 31 32 |
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 30 def y2=(value) self.point1 = new_point(x2, value) end |