Commit aef3db7e authored by Amit Patel's avatar Amit Patel
parent 274d048c
......@@ -2834,7 +2834,6 @@ Performance/OpenStruct:
- 'Guardfile'
- 'app/finders/snippets_finder.rb'
- 'app/helpers/application_settings_helper.rb'
- 'app/models/cycle_analytics/project_level_stage_adapter.rb'
- 'ee/lib/gitlab/graphql/aggregations/epics/epic_node.rb'
- 'ee/lib/gitlab/graphql/aggregations/epics/epic_node.rb'
- 'lib/api/wikis.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,
......
---
title: Replace OpenStruct with Struct in project_level_stage_adapter.rb
merge_request: 59956
author: Amit Patel @amit.savani
type: performance
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment