Class: ParadeDB::Arel::Nodes::FuzzyCast
- Inherits:
-
Arel::Nodes::Node
- Object
- Arel::Nodes::Node
- ParadeDB::Arel::Nodes::FuzzyCast
- Defined in:
- lib/parade_db/arel/nodes.rb
Instance Attribute Summary collapse
-
#distance ⇒ Object
readonly
Returns the value of attribute distance.
-
#expr ⇒ Object
readonly
Returns the value of attribute expr.
-
#prefix ⇒ Object
readonly
Returns the value of attribute prefix.
-
#transposition_cost_one ⇒ Object
readonly
Returns the value of attribute transposition_cost_one.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
- #hash ⇒ Object
-
#initialize(expr, distance, prefix: nil, transposition_cost_one: nil) ⇒ FuzzyCast
constructor
A new instance of FuzzyCast.
Constructor Details
#initialize(expr, distance, prefix: nil, transposition_cost_one: nil) ⇒ FuzzyCast
Returns a new instance of FuzzyCast.
88 89 90 91 92 93 |
# File 'lib/parade_db/arel/nodes.rb', line 88 def initialize(expr, distance, prefix: nil, transposition_cost_one: nil) @expr = expr @distance = distance @prefix = prefix @transposition_cost_one = transposition_cost_one end |
Instance Attribute Details
#distance ⇒ Object (readonly)
Returns the value of attribute distance.
86 87 88 |
# File 'lib/parade_db/arel/nodes.rb', line 86 def distance @distance end |
#expr ⇒ Object (readonly)
Returns the value of attribute expr.
86 87 88 |
# File 'lib/parade_db/arel/nodes.rb', line 86 def expr @expr end |
#prefix ⇒ Object (readonly)
Returns the value of attribute prefix.
86 87 88 |
# File 'lib/parade_db/arel/nodes.rb', line 86 def prefix @prefix end |
#transposition_cost_one ⇒ Object (readonly)
Returns the value of attribute transposition_cost_one.
86 87 88 |
# File 'lib/parade_db/arel/nodes.rb', line 86 def transposition_cost_one @transposition_cost_one end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
99 100 101 102 103 104 105 |
# File 'lib/parade_db/arel/nodes.rb', line 99 def eql?(other) self.class == other.class && expr == other.expr && distance == other.distance && prefix == other.prefix && transposition_cost_one == other.transposition_cost_one end |
#hash ⇒ Object
95 96 97 |
# File 'lib/parade_db/arel/nodes.rb', line 95 def hash [self.class, expr, distance, prefix, transposition_cost_one].hash end |