From 2f1c21ff7987f2aaf1b3a3ea85ef273f4e847123 Mon Sep 17 00:00:00 2001 From: Denis Knauf Date: Sat, 16 Mar 2013 16:31:50 +0100 Subject: [PATCH] checks: check gets class --- lib/nsca.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/nsca.rb b/lib/nsca.rb index 9b4a3bd..614adb8 100644 --- a/lib/nsca.rb +++ b/lib/nsca.rb @@ -323,8 +323,9 @@ module NSCA const_set cl, NSCA::PerformanceData.create( *params) end - def check cl, *params - const_set cl, NSCA::Check.create( *params) + def check cl, service, hostname, perfdatas + perfdatas.map! {|cl| cl.is_a?( Symbol) ? const_get( cl) : cl } + const_set cl, NSCA::Check.create( service, hostname, perfdatas) end end end