Class: NewRelic::Plugin::SimpleSyntax::Agent

Inherits:
Agent::Base
  • Object
show all
Defined in:
lib/newrelic_plugin/simple_syntax.rb

Instance Attribute Summary

Attributes inherited from Agent::Base

#name

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Agent::Base

agent_config_options, agent_guid, agent_human_labels, agent_version, config_required?, #guid, #initialize, #instance_label, #label, no_config_required, #report_metric, #run, #version

Constructor Details

This class inherits a constructor from NewRelic::Plugin::Agent::Base

Class Method Details

.guid=(guid) ⇒ Object



15
16
17
# File 'lib/newrelic_plugin/simple_syntax.rb', line 15

def guid= guid
  agent_guid guid
end

.human_labels(label, &block) ⇒ Object



21
22
23
# File 'lib/newrelic_plugin/simple_syntax.rb', line 21

def human_labels label,&block
  agent_human_labels label,&block
end

.poll_cycle_proc=(block) ⇒ Object



24
25
26
# File 'lib/newrelic_plugin/simple_syntax.rb', line 24

def poll_cycle_proc= block
  @@poll_cycle_proc = block
end

.version=(version) ⇒ Object



18
19
20
# File 'lib/newrelic_plugin/simple_syntax.rb', line 18

def version= version
  agent_version version
end

Instance Method Details

#poll_cycleObject



28
29
30
31
32
33
# File 'lib/newrelic_plugin/simple_syntax.rb', line 28

def poll_cycle
  mod=Module.new
  mod.send :define_method,:call_poll_cycle,@@poll_cycle_proc
  self.extend mod
  self.call_poll_cycle self
end