Class: Torque::PostgreSQL::Segment

Inherits:
Struct
  • Object
show all
Defined in:
lib/torque/postgresql/adapter/oid/segment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#point0Object

Returns the value of attribute point0

Returns:

  • (Object)

    the current value of point0



3
4
5
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 3

def point0
  @point0
end

#point1Object

Returns the value of attribute point1

Returns:

  • (Object)

    the current value of point1



3
4
5
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 3

def point1
  @point1
end

Instance Method Details

#x1Object



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

#x2Object



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

#y1Object



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

#y2Object



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