Class: Gitlab::Usage::ServicePing::LegacyMetricMetadataDecorator

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/gitlab/usage/service_ping/legacy_metric_metadata_decorator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, duration, error: nil) ⇒ LegacyMetricMetadataDecorator

Returns a new instance of LegacyMetricMetadataDecorator.



11
12
13
14
15
# File 'lib/gitlab/usage/service_ping/legacy_metric_metadata_decorator.rb', line 11

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

Instance Attribute Details

#durationObject (readonly)

Returns the value of attribute duration.



7
8
9
# File 'lib/gitlab/usage/service_ping/legacy_metric_metadata_decorator.rb', line 7

def duration
  @duration
end

#errorObject (readonly)

Returns the value of attribute error.



7
8
9
# File 'lib/gitlab/usage/service_ping/legacy_metric_metadata_decorator.rb', line 7

def error
  @error
end