summaryrefslogtreecommitdiff
path: root/lib/gitlab/usage/service_ping/legacy_metric_metadata_decorator.rb
blob: db313bc1fbe0f6df5d3d54996e90af9aa264f2eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

module Gitlab
  module Usage
    module ServicePing
      class LegacyMetricMetadataDecorator < SimpleDelegator
        attr_reader :duration, :error

        delegate :class, :is_a?, :kind_of?, :nil?, to: :__getobj__

        def initialize(value, duration, error: nil)
          @duration = duration
          @error = error
          super(value)
        end
      end
    end
  end
end