Method: OneApm::Collector::StatsHash#merge!

Defined in:
lib/one_apm/collector/stats_engine/stats_hash.rb

#merge!(other) ⇒ Object



75
76
77
78
79
80
81
82
83
# File 'lib/one_apm/collector/stats_engine/stats_hash.rb', line 75

def merge!(other)
  if other.is_a?(StatsHash) && other.started_at < @started_at
    @started_at = other.started_at
  end
  other.each do |key, val|
    merge_or_insert(key, val)
  end
  self
end