Class: Torque::PostgreSQL::Box
- Inherits:
-
Struct
- Object
- Struct
- Torque::PostgreSQL::Box
- Defined in:
- lib/torque/postgresql/adapter/oid/box.rb
Instance Attribute Summary collapse
-
#x1 ⇒ Object
Returns the value of attribute x1.
-
#x2 ⇒ Object
Returns the value of attribute x2.
-
#y1 ⇒ Object
Returns the value of attribute y1.
-
#y2 ⇒ Object
Returns the value of attribute y2.
Instance Method Summary collapse
Instance Attribute Details
#x1 ⇒ Object
Returns the value of attribute x1
5 6 7 |
# File 'lib/torque/postgresql/adapter/oid/box.rb', line 5 def x1 @x1 end |
#x2 ⇒ Object
Returns the value of attribute x2
5 6 7 |
# File 'lib/torque/postgresql/adapter/oid/box.rb', line 5 def x2 @x2 end |
#y1 ⇒ Object
Returns the value of attribute y1
5 6 7 |
# File 'lib/torque/postgresql/adapter/oid/box.rb', line 5 def y1 @y1 end |
#y2 ⇒ Object
Returns the value of attribute y2
5 6 7 |
# File 'lib/torque/postgresql/adapter/oid/box.rb', line 5 def y2 @y2 end |
Instance Method Details
#points ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/torque/postgresql/adapter/oid/box.rb', line 6 def points klass = Torque::PostgreSQL.config.geometry.point_class [ klass.new(x1, y1), klass.new(x1, y2), klass.new(x2, y1), klass.new(x2, y2), ] end |