Class: NewRelic::Agent::ChainedStats

Inherits:
Object
  • Object
show all
Defined in:
lib/new_relic/agent/stats.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scoped_stats, unscoped_stats) ⇒ ChainedStats

Returns a new instance of ChainedStats.



144
145
146
147
# File 'lib/new_relic/agent/stats.rb', line 144

def initialize(scoped_stats, unscoped_stats)
  @scoped_stats = scoped_stats
  @unscoped_stats = unscoped_stats
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



149
150
151
152
# File 'lib/new_relic/agent/stats.rb', line 149

def method_missing(method, *args)
  unscoped_stats.send(method, *args)
  scoped_stats.send(method, *args)
end

Instance Attribute Details

#scoped_statsObject

Returns the value of attribute scoped_stats.



142
143
144
# File 'lib/new_relic/agent/stats.rb', line 142

def scoped_stats
  @scoped_stats
end

#unscoped_statsObject

Returns the value of attribute unscoped_stats.



142
143
144
# File 'lib/new_relic/agent/stats.rb', line 142

def unscoped_stats
  @unscoped_stats
end