blob: 3c69c729f36fbf001ec8f975fa2a9f1010d874ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# frozen_string_literal: true
module BulkImports
module Pipeline
class Context
attr_accessor :extra
attr_reader :tracker
def initialize(tracker, extra = {})
@tracker = tracker
@extra = extra
end
def entity
@entity ||= tracker.entity
end
def group
@group ||= entity.group
end
def bulk_import
@bulk_import ||= entity.bulk_import
end
def current_user
@current_user ||= bulk_import.user
end
def configuration
@configuration ||= bulk_import.configuration
end
end
end
end
|