diff options
Diffstat (limited to 'app/models/cycle_analytics')
-rw-r--r-- | app/models/cycle_analytics/project_level_stage_adapter.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/cycle_analytics/project_level_stage_adapter.rb b/app/models/cycle_analytics/project_level_stage_adapter.rb index dd4afa9b809..5538e93a39e 100644 --- a/app/models/cycle_analytics/project_level_stage_adapter.rb +++ b/app/models/cycle_analytics/project_level_stage_adapter.rb @@ -4,6 +4,8 @@ # compatible with the old value stream controller actions. module CycleAnalytics class ProjectLevelStageAdapter + ProjectLevelStage = Struct.new(:title, :description, :legend, :name, :project_median, keyword_init: true ) + def initialize(stage, options) @stage = stage @options = options @@ -13,7 +15,7 @@ module CycleAnalytics def as_json(serializer: AnalyticsStageSerializer) presenter = Analytics::CycleAnalytics::StagePresenter.new(stage) - serializer.new.represent(OpenStruct.new( + serializer.new.represent(ProjectLevelStage.new( title: presenter.title, description: presenter.description, legend: presenter.legend, |