Class: Gitlab::Prometheus::Metric
- Inherits:
-
Object
- Object
- Gitlab::Prometheus::Metric
- Includes:
- ActiveModel::Model
- Defined in:
- lib/gitlab/prometheus/metric.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#queries ⇒ Object
Returns the value of attribute queries.
-
#required_metrics ⇒ Object
Returns the value of attribute required_metrics.
-
#title ⇒ Object
Returns the value of attribute title.
-
#weight ⇒ Object
Returns the value of attribute weight.
-
#y_label ⇒ Object
Returns the value of attribute y_label.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Metric
constructor
A new instance of Metric.
Constructor Details
#initialize(params = {}) ⇒ Metric
Returns a new instance of Metric.
12 13 14 15 |
# File 'lib/gitlab/prometheus/metric.rb', line 12 def initialize(params = {}) super(params) @y_label ||= 'Values' end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
8 9 10 |
# File 'lib/gitlab/prometheus/metric.rb', line 8 def id @id end |
#queries ⇒ Object
Returns the value of attribute queries.
8 9 10 |
# File 'lib/gitlab/prometheus/metric.rb', line 8 def queries @queries end |
#required_metrics ⇒ Object
Returns the value of attribute required_metrics.
8 9 10 |
# File 'lib/gitlab/prometheus/metric.rb', line 8 def required_metrics @required_metrics end |
#title ⇒ Object
Returns the value of attribute title.
8 9 10 |
# File 'lib/gitlab/prometheus/metric.rb', line 8 def title @title end |
#weight ⇒ Object
Returns the value of attribute weight.
8 9 10 |
# File 'lib/gitlab/prometheus/metric.rb', line 8 def weight @weight end |
#y_label ⇒ Object
Returns the value of attribute y_label.
8 9 10 |
# File 'lib/gitlab/prometheus/metric.rb', line 8 def y_label @y_label end |