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
|
|
|
|
|
2021-01-11 12:10:41 +00:00
|
|
|
OnboardingProgress.register(@namespace, action)
|
2020-12-03 18:10:10 +00:00
|
|
|
end
|
|
|
|
end
|