Class: RubyScriptExporter::Service
- Inherits:
-
Object
- Object
- RubyScriptExporter::Service
- Defined in:
- lib/ruby_script_exporter/service.rb
Defined Under Namespace
Classes: Builder
Instance Attribute Summary collapse
-
#labels ⇒ Object
readonly
Returns the value of attribute labels.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#probes ⇒ Object
readonly
Returns the value of attribute probes.
Instance Method Summary collapse
- #combined_labels ⇒ Object
-
#initialize(name) ⇒ Service
constructor
A new instance of Service.
Constructor Details
#initialize(name) ⇒ Service
Returns a new instance of Service.
10 11 12 13 14 |
# File 'lib/ruby_script_exporter/service.rb', line 10 def initialize(name) @name = name @probes = [] @labels = {} end |
Instance Attribute Details
#labels ⇒ Object (readonly)
Returns the value of attribute labels.
8 9 10 |
# File 'lib/ruby_script_exporter/service.rb', line 8 def labels @labels end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/ruby_script_exporter/service.rb', line 6 def name @name end |
#probes ⇒ Object (readonly)
Returns the value of attribute probes.
7 8 9 |
# File 'lib/ruby_script_exporter/service.rb', line 7 def probes @probes end |
Instance Method Details
#combined_labels ⇒ Object
16 17 18 19 20 |
# File 'lib/ruby_script_exporter/service.rb', line 16 def combined_labels { service: @name, }.merge(@labels).compact end |