Commit f1c63c0a authored by Rémy Coutable's avatar Rémy Coutable

Merge branch...

Merge branch '300046-follow-up-from-add-usage_metric_definition-generator-to-generate-new-yaml-metric-file' into 'master'

Freeze Directory struct inside Gitlab::UsageMetricDefinitionGenerator

See merge request gitlab-org/gitlab!56801
parents e4cd9e2b d67d2431
......@@ -5,6 +5,11 @@ require 'rails/generators'
module Gitlab
class UsageMetricDefinitionGenerator < Rails::Generators::Base
Directory = Struct.new(:name, :time_frame, :value_type) do
def initialize(...)
super
freeze
end
def match?(str)
(name == str || time_frame == str) && str != 'none'
end
......
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