Class: ParadeDB::Arel::Nodes::ParseNode

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(query, lenient: nil, conjunction_mode: nil) ⇒ ParseNode

Returns a new instance of ParseNode.



170
171
172
173
174
# File 'lib/parade_db/arel/nodes.rb', line 170

def initialize(query, lenient: nil, conjunction_mode: nil)
  @query = query
  @lenient = lenient
  @conjunction_mode = conjunction_mode
end

Instance Attribute Details

#conjunction_modeObject (readonly)

Returns the value of attribute conjunction_mode.



168
169
170
# File 'lib/parade_db/arel/nodes.rb', line 168

def conjunction_mode
  @conjunction_mode
end

#lenientObject (readonly)

Returns the value of attribute lenient.



168
169
170
# File 'lib/parade_db/arel/nodes.rb', line 168

def lenient
  @lenient
end

#queryObject (readonly)

Returns the value of attribute query.



168
169
170
# File 'lib/parade_db/arel/nodes.rb', line 168

def query
  @query
end

Instance Method Details

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

Returns:

  • (Boolean)


180
181
182
183
184
185
# File 'lib/parade_db/arel/nodes.rb', line 180

def eql?(other)
  self.class == other.class &&
    query == other.query &&
    lenient == other.lenient &&
    conjunction_mode == other.conjunction_mode
end

#hashObject



176
177
178
# File 'lib/parade_db/arel/nodes.rb', line 176

def hash
  [self.class, query, lenient, conjunction_mode].hash
end