perfdata_for: type: value -> label
This commit is contained in:
parent
27d4db6782
commit
21031daf8e
|
@ -97,12 +97,11 @@ module NSCA
|
|||
end
|
||||
|
||||
def perfdata_for label
|
||||
if value.is_a? PerformanceData::Base
|
||||
if label.is_a? PerformanceData::Base
|
||||
label
|
||||
else
|
||||
perfdata_label = perfdata_label.to_sym
|
||||
cl = self.class.perfdatas[perfdata_label]
|
||||
cl || PerformanceData::Base.new( perfdata_label)
|
||||
self.class.perfdatas[perfdata_label] || PerformanceData::Base.new( perfdata_label)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue