2020-12-03 18:10:10 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class OnboardingProgressService
|
|
|
|
def initialize(namespace)
|
2020-12-23 12:10:26 +00:00
|
|
|
@namespace = namespace&.root_ancestor
|
2020-12-03 18:10:10 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def execute(action:)
|
2020-12-23 12:10:26 +00:00
|
|
|
return unless @namespace
|
|
|
|
|
2020-12-03 18:10:10 +00:00
|
|
|
NamespaceOnboardingAction.create_action(@namespace, action)
|
|
|
|
end
|
|
|
|
end
|