Module: Coolhand::Collector
- Defined in:
- lib/coolhand/collector.rb
Overview
Utility for generating collector identification string
Constant Summary collapse
- COLLECTION_METHODS =
%w[manual auto-monitor].freeze
Class Method Summary collapse
-
.get_collector_string(method = nil) ⇒ String
Gets the collector identification string Format: “coolhand-ruby-X.Y.Z” or “coolhand-ruby-X.Y.Z-method”.
Class Method Details
.get_collector_string(method = nil) ⇒ String
Gets the collector identification string Format: “coolhand-ruby-X.Y.Z” or “coolhand-ruby-X.Y.Z-method”
13 14 15 16 |
# File 'lib/coolhand/collector.rb', line 13 def get_collector_string(method = nil) base = "coolhand-ruby-#{VERSION}" method && COLLECTION_METHODS.include?(method) ? "#{base}-#{method}" : base end |