perfdata_for: type: value -> label

This commit is contained in:
Denis Knauf 2013-04-09 21:05:37 +02:00
parent 27d4db6782
commit 21031daf8e

View file

@ -97,12 +97,11 @@ module NSCA
end end
def perfdata_for label def perfdata_for label
if value.is_a? PerformanceData::Base if label.is_a? PerformanceData::Base
label label
else else
perfdata_label = perfdata_label.to_sym perfdata_label = perfdata_label.to_sym
cl = self.class.perfdatas[perfdata_label] self.class.perfdatas[perfdata_label] || PerformanceData::Base.new( perfdata_label)
cl || PerformanceData::Base.new( perfdata_label)
end end
end end