File: variant.rb

package info (click to toggle)
ruby-gitlab-experiment 0.9.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 260 kB
  • sloc: ruby: 1,202; makefile: 7
file content (11 lines) | stat: -rw-r--r-- 224 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: true

module Gitlab
  class Experiment
    Variant = Struct.new(:name, :payload, keyword_init: true) do
      def group
        name == 'control' ? :control : :experiment
      end
    end
  end
end