Class: Lucene::BinaryOp

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Defined in:
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/search/parser.rb,
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/lucene_nodes.rb

Instance Method Summary collapse

Instance Method Details

#match(item) ⇒ Object



131
132
133
134
135
136
# File 'lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/search/parser.rb', line 131

def match( item )
  self.elements[1].match(
    self.elements[0].match(item),
    self.elements[2].match(item)
  )
end

#to_arrayObject



142
143
144
145
146
147
# File 'lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/vendor/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/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/vendor/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