Class: ErpIntegration::Fulfil::OrClause
- Inherits:
-
Object
- Object
- ErpIntegration::Fulfil::OrClause
- Defined in:
- lib/erp_integration/fulfil/or_clause.rb
Constant Summary collapse
- LOGIC_OPERATOR =
'OR'
Instance Method Summary collapse
-
#initialize(where_clauses:) ⇒ OrClause
constructor
A new instance of OrClause.
- #to_filter ⇒ Object
Constructor Details
#initialize(where_clauses:) ⇒ OrClause
Returns a new instance of OrClause.
8 9 10 |
# File 'lib/erp_integration/fulfil/or_clause.rb', line 8 def initialize(where_clauses:) @where_clauses = where_clauses end |
Instance Method Details
#to_filter ⇒ Object
12 13 14 15 16 |
# File 'lib/erp_integration/fulfil/or_clause.rb', line 12 def to_filter return [] unless @where_clauses.any? @where_clauses.map(&:to_filter).unshift(LOGIC_OPERATOR) end |