Class: ParadeDB::Arel::Nodes::ConstCast

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, score) ⇒ ConstCast

Returns a new instance of ConstCast.



30
31
32
33
# File 'lib/parade_db/arel/nodes.rb', line 30

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

Instance Attribute Details

#exprObject (readonly)

Returns the value of attribute expr.



28
29
30
# File 'lib/parade_db/arel/nodes.rb', line 28

def expr
  @expr
end

#scoreObject (readonly)

Returns the value of attribute score.



28
29
30
# File 'lib/parade_db/arel/nodes.rb', line 28

def score
  @score
end

Instance Method Details

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

Returns:

  • (Boolean)


39
40
41
42
43
# File 'lib/parade_db/arel/nodes.rb', line 39

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

#hashObject



35
36
37
# File 'lib/parade_db/arel/nodes.rb', line 35

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