Class: SQLSearch::Conditions::Or

Inherits:
Object
  • Object
show all
Defined in:
lib/sql_search_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Or

Returns a new instance of Or.



21
22
23
# File 'lib/sql_search_parser.rb', line 21

def initialize options
  @left = options[:left]; @right = options[:right]
end

Instance Attribute Details

#leftObject (readonly)

Returns the value of attribute left.



20
21
22
# File 'lib/sql_search_parser.rb', line 20

def left
  @left
end

#rightObject (readonly)

Returns the value of attribute right.



20
21
22
# File 'lib/sql_search_parser.rb', line 20

def right
  @right
end

Instance Method Details

#to_sObject



25
26
27
# File 'lib/sql_search_parser.rb', line 25

def to_s
  "(#{left}) OR (#{right})"
end