Class: Gitlab::BatchWorkerContext

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/batch_worker_context.rb

Instance Method Summary collapse

Constructor Details

#initialize(objects, arguments_proc:, context_proc:) ⇒ BatchWorkerContext

Returns a new instance of BatchWorkerContext.


5
6
7
8
9
# File 'lib/gitlab/batch_worker_context.rb', line 5

def initialize(objects, arguments_proc:, context_proc:)
  @objects = objects
  @arguments_proc = arguments_proc
  @context_proc = context_proc
end

Instance Method Details

#argumentsObject


11
12
13
# File 'lib/gitlab/batch_worker_context.rb', line 11

def arguments
  context_by_arguments.keys
end

#context_for(arguments) ⇒ Object


15
16
17
# File 'lib/gitlab/batch_worker_context.rb', line 15

def context_for(arguments)
  context_by_arguments[arguments]
end