Class: ParadeDB::Arel::Nodes::BoostCast

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, factor) ⇒ BoostCast

Returns a new instance of BoostCast.



10
11
12
13
# File 'lib/parade_db/arel/nodes.rb', line 10

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

Instance Attribute Details

#exprObject (readonly)

Returns the value of attribute expr.



8
9
10
# File 'lib/parade_db/arel/nodes.rb', line 8

def expr
  @expr
end

#factorObject (readonly)

Returns the value of attribute factor.



8
9
10
# File 'lib/parade_db/arel/nodes.rb', line 8

def factor
  @factor
end

Instance Method Details

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

Returns:

  • (Boolean)


19
20
21
22
23
# File 'lib/parade_db/arel/nodes.rb', line 19

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

#hashObject



15
16
17
# File 'lib/parade_db/arel/nodes.rb', line 15

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