Class: FattureInCloud_Ruby_Sdk::Conjunction
- Inherits:
-
Expression
- Object
- Expression
- FattureInCloud_Ruby_Sdk::Conjunction
- Defined in:
- lib/fattureincloud_ruby_sdk/filter/conjunction.rb
Overview
The Conjunction class is used to build a conjunction of two expressions.
Instance Attribute Summary collapse
-
#left ⇒ Object
Returns the value of attribute left.
-
#right ⇒ Object
Returns the value of attribute right.
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
Overrides the == operator.
-
#build_query ⇒ String
Builds the query from the conjunction.
-
#initialize(left, right) ⇒ Conjunction
constructor
Initializes a new instance of the Conjunction class.
-
#to_s ⇒ String
Builds the query from the conjunction.
Constructor Details
#initialize(left, right) ⇒ Conjunction
Initializes a new instance of the Conjunction class.
9 10 11 12 |
# File 'lib/fattureincloud_ruby_sdk/filter/conjunction.rb', line 9 def initialize(left, right) @left = left @right = right end |
Instance Attribute Details
#left ⇒ Object
Returns the value of attribute left.
4 5 6 |
# File 'lib/fattureincloud_ruby_sdk/filter/conjunction.rb', line 4 def left @left end |
#right ⇒ Object
Returns the value of attribute right.
4 5 6 |
# File 'lib/fattureincloud_ruby_sdk/filter/conjunction.rb', line 4 def right @right end |
Instance Method Details
#==(other) ⇒ Boolean
Overrides the == operator.
29 30 31 32 33 34 35 |
# File 'lib/fattureincloud_ruby_sdk/filter/conjunction.rb', line 29 def ==(other) if other.instance_of? Conjunction @left == other.left && @right == other.right else false end end |
#build_query ⇒ String
Builds the query from the conjunction.
16 17 18 |
# File 'lib/fattureincloud_ruby_sdk/filter/conjunction.rb', line 16 def build_query "(#{@left.build_query} and #{@right.build_query})" end |
#to_s ⇒ String
Builds the query from the conjunction.
22 23 24 |
# File 'lib/fattureincloud_ruby_sdk/filter/conjunction.rb', line 22 def to_s build_query end |