Class: Cyby::Kintone::Query::WhereAnd
- Inherits:
-
Object
- Object
- Cyby::Kintone::Query::WhereAnd
- Defined in:
- lib/cyby/kintone/query/where_and.rb
Instance Method Summary collapse
-
#initialize(lhs, rhs) ⇒ WhereAnd
constructor
A new instance of WhereAnd.
- #to_query ⇒ Object
Constructor Details
#initialize(lhs, rhs) ⇒ WhereAnd
Returns a new instance of WhereAnd.
5 6 7 8 |
# File 'lib/cyby/kintone/query/where_and.rb', line 5 def initialize(lhs, rhs) @lhs = lhs @rhs = rhs end |
Instance Method Details
#to_query ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/cyby/kintone/query/where_and.rb', line 10 def to_query if @lhs.to_query.blank? @rhs.to_query elsif @rhs.to_query.blank? @lhs.to_query else "(#{@lhs.to_query} and #{@rhs.to_query})" end end |