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.



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

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

  super(*nodes)
end

Instance Attribute Details

#collectionObject (readonly)

Returns the value of attribute collection.



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

def collection
  @collection
end

Instance Method Details

#finalize!Object



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

def finalize!
  FulltextExpression.new collection, self
end

#fulltext?Boolean

Returns:

  • (Boolean)


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

def fulltext?
  true
end