lib/onering/plugins/reporter.rb in onering-client-0.0.71 vs lib/onering/plugins/reporter.rb in onering-client-0.0.72
- old
+ new
@@ -86,15 +86,15 @@
instance_eval(&block)
end
end
def property(name, value=nil)
- @_report[:properties].set(name.to_s.gsub('.','_'), value) if value
+ @_report[:properties].set(name.to_s.gsub('.','_'), value) unless value.nil?
end
def stat(name, value=nil)
@_report[:properties][:metrics] ||= {}
- @_report[:properties][:metrics].set(name.to_s.gsub('.','_'), value) if value
+ @_report[:properties][:metrics].set(name.to_s.gsub('.','_'), value) unless value.nil?
end
def report()
@id = (@options[:id] || Onering::Util.fact('hardwareid', nil))