Class: AttrSearchableGrammar::Nodes::FulltextCollection

Inherits:
Collection
  • Object
show all
Defined in:
lib/attr_searchable_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, #to_sql

Constructor Details

#initialize(collection, *nodes) ⇒ FulltextCollection

Returns a new instance of FulltextCollection.



163
164
165
166
167
# File 'lib/attr_searchable_grammar/nodes.rb', line 163

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

  super *nodes
end

Instance Attribute Details

#collectionObject (readonly)

Returns the value of attribute collection.



161
162
163
# File 'lib/attr_searchable_grammar/nodes.rb', line 161

def collection
  @collection
end

Instance Method Details

#finalize!Object



173
174
175
# File 'lib/attr_searchable_grammar/nodes.rb', line 173

def finalize!
  FulltextExpression.new collection, self
end

#fulltext?Boolean

Returns:

  • (Boolean)


169
170
171
# File 'lib/attr_searchable_grammar/nodes.rb', line 169

def fulltext?
  true
end