Module: MR::ReadModel::QueryExpression
- Defined in:
- lib/mr/read_model/query_expression.rb
Class Method Summary collapse
Class Method Details
.new(type, *args, &block) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/mr/read_model/query_expression.rb', line 6 def self.new(type, *args, &block) if !args.empty? StaticQueryExpression.new(type, *args) elsif block DynamicQueryExpression.new(type, &block) else raise InvalidQueryExpressionError, "must be passed args or a block" end end |