Module: SearchGrammar::Boolean

Defined in:
lib/buhos/search_parser.rb

Instance Method Summary collapse

Instance Method Details

#to_arrayObject



40
41
42
43
44
45
46
# File 'lib/buhos/search_parser.rb', line 40

def to_array
  e1=(self.elements[0].respond_to?(:to_array)) ? self.elements[0].to_array : self.elements[0].text_value
  e2=(self.elements[2].respond_to?(:to_array)) ? self.elements[2].to_array : self.elements[2].text_value

  [:boolean, self.elements[1].text_value.to_sym, e1,e2]
  #BooleanElement.new(self.elements[1].text_value, e1,e2)
end