Class: Lucene::BinaryOp

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Defined in:
lib/chef/solr_query/lucene_nodes.rb

Instance Method Summary collapse

Instance Method Details

#to_arrayObject



142
143
144
145
146
147
# File 'lib/chef/solr_query/lucene_nodes.rb', line 142

def to_array
  op = self.elements[1].to_array
  a = self.elements[0].to_array
  b = self.elements[2].to_array
  "(#{op} #{a} #{b})"
end

#transformObject



149
150
151
152
153
154
# File 'lib/chef/solr_query/lucene_nodes.rb', line 149

def transform
  op = self.elements[1].transform
  a = self.elements[0].transform
  b = self.elements[2].transform
  "#{a} #{op} #{b}"
end