debian-mirror-gitlab/lib/bulk_imports/pipeline/context.rb
2021-03-11 19:13:27 +05:30

28 lines
489 B
Ruby

# frozen_string_literal: true
module BulkImports
module Pipeline
class Context
attr_reader :entity, :bulk_import
attr_accessor :extra
def initialize(entity, extra = {})
@entity = entity
@bulk_import = entity.bulk_import
@extra = extra
end
def group
entity.group
end
def current_user
bulk_import.user
end
def configuration
bulk_import.configuration
end
end
end
end