Class: RubyScriptExporter::Service

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_script_exporter/service.rb

Defined Under Namespace

Classes: Builder

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#labelsObject (readonly)

Returns the value of attribute labels.



8
9
10
# File 'lib/ruby_script_exporter/service.rb', line 8

def labels
  @labels
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/ruby_script_exporter/service.rb', line 6

def name
  @name
end

#probesObject (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_labelsObject



16
17
18
19
20
# File 'lib/ruby_script_exporter/service.rb', line 16

def combined_labels
  {
    service: @name,
  }.merge(@labels).compact
end