Class: MetricsEvent
- Inherits:
-
Object
- Object
- MetricsEvent
- Defined in:
- lib/ff/ruby/server/sdk/api/metrics_event.rb
Instance Attribute Summary collapse
-
#feature_config ⇒ Object
Returns the value of attribute feature_config.
-
#target ⇒ Object
Returns the value of attribute target.
-
#variation ⇒ Object
Returns the value of attribute variation.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(feature_config, target, variation) ⇒ MetricsEvent
constructor
A new instance of MetricsEvent.
Constructor Details
#initialize(feature_config, target, variation) ⇒ MetricsEvent
Returns a new instance of MetricsEvent.
5 6 7 8 9 10 11 |
# File 'lib/ff/ruby/server/sdk/api/metrics_event.rb', line 5 def initialize(feature_config, target, variation) @target = target @variation = variation @feature_config = feature_config freeze end |
Instance Attribute Details
#feature_config ⇒ Object
Returns the value of attribute feature_config.
3 4 5 |
# File 'lib/ff/ruby/server/sdk/api/metrics_event.rb', line 3 def feature_config @feature_config end |
#target ⇒ Object
Returns the value of attribute target.
3 4 5 |
# File 'lib/ff/ruby/server/sdk/api/metrics_event.rb', line 3 def target @target end |
#variation ⇒ Object
Returns the value of attribute variation.
3 4 5 |
# File 'lib/ff/ruby/server/sdk/api/metrics_event.rb', line 3 def variation @variation end |
Instance Method Details
#==(other) ⇒ Object
13 14 15 |
# File 'lib/ff/ruby/server/sdk/api/metrics_event.rb', line 13 def ==(other) eql?(other) end |
#eql?(other) ⇒ Boolean
17 18 19 20 21 |
# File 'lib/ff/ruby/server/sdk/api/metrics_event.rb', line 17 def eql?(other) feature_config.feature == other.feature_config.feature and variation.identifier == other.variation.identifier and target.identifier == other.target.identifier end |
#hash ⇒ Object
23 24 25 |
# File 'lib/ff/ruby/server/sdk/api/metrics_event.rb', line 23 def hash feature_config.feature.hash | variation.identifier.hash | target.identifier.hash end |