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



5
6
7
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 5

def point0
  @point0
end

#point1Object

Returns the value of attribute point1

Returns:

  • (Object)

    the current value of point1



5
6
7
# File 'lib/torque/postgresql/adapter/oid/segment.rb', line 5

def point1
  @point1
end

Instance Method Details

#x1Object



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

#x2Object



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

#y1Object



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

#y2Object



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