class MR::ReadModel::StaticQueryExpression

Attributes

args[R]
type[R]

Public Class Methods

new(type, *args) click to toggle source
# File lib/mr/read_model/query_expression.rb, line 20
def initialize(type, *args)
  @type = type
  @args = args
end

Public Instance Methods

apply_to(relation, params = nil) click to toggle source

`apply_to` has to take params that it ignores, so it has the same interface as `DynamicQueryExpression` (which actually uses the params)

# File lib/mr/read_model/query_expression.rb, line 27
def apply_to(relation, params = nil)
  relation.send(@type, *@args)
end