Class: SQLSearch::Conditions::And

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ And

Returns a new instance of And.



10
11
12
# File 'lib/sql_search_parser.rb', line 10

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

Instance Attribute Details

#leftObject (readonly)

Returns the value of attribute left.



9
10
11
# File 'lib/sql_search_parser.rb', line 9

def left
  @left
end

#rightObject (readonly)

Returns the value of attribute right.



9
10
11
# File 'lib/sql_search_parser.rb', line 9

def right
  @right
end

Instance Method Details

#to_sObject



14
15
16
# File 'lib/sql_search_parser.rb', line 14

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