Class: SQLSearch::Comparison
- Inherits:
-
Object
- Object
- SQLSearch::Comparison
- Defined in:
- lib/sql_search_parser.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#left ⇒ Object
readonly
Returns the value of attribute left.
-
#operator ⇒ Object
readonly
Returns the value of attribute operator.
-
#right ⇒ Object
readonly
Returns the value of attribute right.
Instance Method Summary collapse
-
#initialize(options) ⇒ Comparison
constructor
A new instance of Comparison.
- #to_s ⇒ Object
Constructor Details
#initialize(options) ⇒ Comparison
Returns a new instance of Comparison.
45 46 47 48 49 |
# File 'lib/sql_search_parser.rb', line 45 def initialize @left = [:left] @right = [:right] @operator = [:operator] end |
Instance Attribute Details
#left ⇒ Object (readonly)
Returns the value of attribute left.
43 44 45 |
# File 'lib/sql_search_parser.rb', line 43 def left @left end |
#operator ⇒ Object (readonly)
Returns the value of attribute operator.
43 44 45 |
# File 'lib/sql_search_parser.rb', line 43 def operator @operator end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
43 44 45 |
# File 'lib/sql_search_parser.rb', line 43 def right @right end |
Instance Method Details
#to_s ⇒ Object
51 52 53 |
# File 'lib/sql_search_parser.rb', line 51 def to_s "#{left} #{operator} #{right}" end |