Class: ParadeDB::Arel::Nodes::SlopCast

Inherits:
Arel::Nodes::Node
  • Object
show all
Defined in:
lib/parade_db/arel/nodes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(expr, distance) ⇒ SlopCast

Returns a new instance of SlopCast.



68
69
70
71
# File 'lib/parade_db/arel/nodes.rb', line 68

def initialize(expr, distance)
  @expr = expr
  @distance = distance
end

Instance Attribute Details

#distanceObject (readonly)

Returns the value of attribute distance.



66
67
68
# File 'lib/parade_db/arel/nodes.rb', line 66

def distance
  @distance
end

#exprObject (readonly)

Returns the value of attribute expr.



66
67
68
# File 'lib/parade_db/arel/nodes.rb', line 66

def expr
  @expr
end

Instance Method Details

#eql?(other) ⇒ Boolean Also known as: ==

Returns:

  • (Boolean)


77
78
79
80
81
# File 'lib/parade_db/arel/nodes.rb', line 77

def eql?(other)
  self.class == other.class &&
    expr == other.expr &&
    distance == other.distance
end

#hashObject



73
74
75
# File 'lib/parade_db/arel/nodes.rb', line 73

def hash
  [self.class, expr, distance].hash
end