module MR::ReadModel::QueryExpression
Public Class Methods
new(type, *args, &block)
click to toggle source
# 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