Class: SearchCopGrammar::Nodes::FulltextCollection

Inherits:
Collection
  • Object
show all
Defined in:
lib/search_cop_grammar/nodes.rb

Direct Known Subclasses

And::Fulltext, Or::Fulltext

Instance Attribute Summary collapse

Attributes inherited from Collection

#nodes

Instance Method Summary collapse

Methods inherited from Collection

#can_flatten?, #can_group?, #flatten!, #group!

Methods included from Base

#and, #can_flatten?, #can_group?, #can_optimize?, #flatten!, #group!, #nodes, #not, #optimize!, #or

Constructor Details

#initialize(collection, *nodes) ⇒ FulltextCollection

Returns a new instance of FulltextCollection.



166
167
168
169
170
# File 'lib/search_cop_grammar/nodes.rb', line 166

def initialize(collection, *nodes)
  @collection = collection

  super(*nodes)
end

Instance Attribute Details

#collectionObject (readonly)

Returns the value of attribute collection.



164
165
166
# File 'lib/search_cop_grammar/nodes.rb', line 164

def collection
  @collection
end

Instance Method Details

#finalize!Object



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

def finalize!
  FulltextExpression.new collection, self
end

#fulltext?Boolean

Returns:

  • (Boolean)


172
173
174
# File 'lib/search_cop_grammar/nodes.rb', line 172

def fulltext?
  true
end