Class: Arel::Nodes::SpatialValue

Inherits:
Node
  • Object
show all
Defined in:
lib/arel/visitors/postgis.rb

Overview

Wrapper for spatial values that need special handling

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ SpatialValue

Returns a new instance of SpatialValue.



51
52
53
# File 'lib/arel/visitors/postgis.rb', line 51

def initialize(value)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



49
50
51
# File 'lib/arel/visitors/postgis.rb', line 49

def value
  @value
end

Instance Method Details

#distance_operator(other) ⇒ Object Also known as: <->



87
88
89
# File 'lib/arel/visitors/postgis.rb', line 87

def distance_operator(other)
  SpatialDistanceOperator.new(self, other)
end

#st_areaObject



83
84
85
# File 'lib/arel/visitors/postgis.rb', line 83

def st_area
  SpatialArea.new(self)
end

#st_buffer(distance) ⇒ Object



75
76
77
# File 'lib/arel/visitors/postgis.rb', line 75

def st_buffer(distance)
  SpatialBuffer.new(self, distance)
end

#st_contains(other) ⇒ Object



59
60
61
# File 'lib/arel/visitors/postgis.rb', line 59

def st_contains(other)
  SpatialContains.new(self, other)
end

#st_distance(other) ⇒ Object



55
56
57
# File 'lib/arel/visitors/postgis.rb', line 55

def st_distance(other)
  SpatialDistance.new(self, other)
end

#st_dwithin(other, distance) ⇒ Object



71
72
73
# File 'lib/arel/visitors/postgis.rb', line 71

def st_dwithin(other, distance)
  SpatialDWithin.new(self, other, distance)
end

#st_intersects(other) ⇒ Object



67
68
69
# File 'lib/arel/visitors/postgis.rb', line 67

def st_intersects(other)
  SpatialIntersects.new(self, other)
end

#st_transform(srid) ⇒ Object



79
80
81
# File 'lib/arel/visitors/postgis.rb', line 79

def st_transform(srid)
  SpatialTransform.new(self, srid)
end

#st_within(other) ⇒ Object



63
64
65
# File 'lib/arel/visitors/postgis.rb', line 63

def st_within(other)
  SpatialWithin.new(self, other)
end