From 0480986133a3fa8874defcc181ebd41b149da8fd Mon Sep 17 00:00:00 2001 From: Denis Knauf Date: Tue, 9 Apr 2013 15:33:22 +0200 Subject: [PATCH] checks: no auto-const-set (was unclean), cl-parameter removed. --- README.md | 2 +- lib/nsca/check.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5f8d838..7969a51 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,6 @@ TO DO AND DONE TODO ---- -* build packet with performance data * server side parsing of performance data * more documentations * mcrypt-support @@ -30,6 +29,7 @@ DONE * server-API (recv from client) * check-API (describe checks and performance data) * fast usable API for sending checks +* build packet with performance data Copyright ========= diff --git a/lib/nsca/check.rb b/lib/nsca/check.rb index 2dd7f68..ccbc683 100644 --- a/lib/nsca/check.rb +++ b/lib/nsca/check.rb @@ -186,12 +186,12 @@ module NSCA end module Checks - def perfdata( cl, *params) const_set cl, NSCA::PerformanceData.new( *params) end + def perfdata( *params) NSCA::PerformanceData.new( *params) end - def check cl, service, hostname, perfdatas = nil + def check service, hostname, perfdatas = nil perfdatas ||= [] perfdatas.map! {|cl| cl.is_a?( Symbol) ? const_get( cl) : cl } - const_set cl, NSCA::Check.new( service, hostname, perfdatas) + NSCA::Check.new service, hostname, perfdatas end end end