Class: GitlabInternalEventsCli::Metric::Key
- Inherits:
-
Struct
- Object
- Struct
- GitlabInternalEventsCli::Metric::Key
- Defined in:
- lib/gitlab_internal_events_cli/metric.rb
Instance Attribute Summary collapse
-
#events ⇒ Object
Returns the value of attribute events.
-
#identifier ⇒ Object
Returns the value of attribute identifier.
-
#operator ⇒ Object
Returns the value of attribute operator.
-
#time_frame ⇒ Object
Returns the value of attribute time_frame.
Instance Method Summary collapse
Instance Attribute Details
#events ⇒ Object
Returns the value of attribute events
430 431 432 |
# File 'lib/gitlab_internal_events_cli/metric.rb', line 430 def events @events end |
#identifier ⇒ Object
Returns the value of attribute identifier
430 431 432 |
# File 'lib/gitlab_internal_events_cli/metric.rb', line 430 def identifier @identifier end |
#operator ⇒ Object
Returns the value of attribute operator
430 431 432 |
# File 'lib/gitlab_internal_events_cli/metric.rb', line 430 def operator @operator end |
#time_frame ⇒ Object
Returns the value of attribute time_frame
430 431 432 |
# File 'lib/gitlab_internal_events_cli/metric.rb', line 430 def time_frame @time_frame end |
Instance Method Details
#full_path ⇒ Object
442 443 444 |
# File 'lib/gitlab_internal_events_cli/metric.rb', line 442 def full_path "#{operator.key_path}.#{value}" end |
#value(name_to_display = nil) ⇒ Object
433 434 435 436 437 438 439 440 |
# File 'lib/gitlab_internal_events_cli/metric.rb', line 433 def value(name_to_display = nil) [ operator.verb, identifier&.key_path(operator), name_to_display || name_for_events, time_frame&.key_path ].compact.join('_') end |