Class: Zabbix::Sender::Easy

Inherits:
Object
  • Object
show all
Defined in:
lib/zabbix/sender/easy.rb

Class Method Summary collapse

Class Method Details

.run(task, opts = {}, &block) ⇒ Object



2
3
4
5
6
7
# File 'lib/zabbix/sender/easy.rb', line 2

def self.run (task, opts={}, &block)
  zbx = Zabbix::Sender.new(opts)
  zbx.send_start 
  block.call(zbx)
  zbx.send_stop 
end