Module: Metrics::Tags

Defined in:
lib/metrics/tags.rb

Class Method Summary collapse

Class Method Details

.normalize(tags) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/metrics/tags.rb', line 10

def self.normalize(tags)
  return nil unless tags&.any?
  
  if tags.is_a?(Hash)
    tags = tags.map{|key, value| "#{key}:#{value}"}
  end
  
  return Array(tags)
end