Method: Mongory::QueryMatcher#initialize

Defined in:
lib/mongory/query_matcher.rb

#initialize(condition, context: Utils::Context.new) ⇒ QueryMatcher

Initializes a new query matcher with the given condition. The condition is converted using Mongory.condition_converter before being passed to the parent matcher.

Options Hash (context:):

  • :config (Hash)

    The query configuration

  • :current_record (Object)

    The current record being processed

  • :need_convert (Boolean)

    Whether the record needs to be converted



42
43
44
# File 'lib/mongory/query_matcher.rb', line 42

def initialize(condition, context: Utils::Context.new)
  super(Mongory.condition_converter.convert(condition), context: context)
end