lib/onering/cli/reporter.rb in onering-client-0.2.0 vs lib/onering/cli/reporter.rb in onering-client-0.2.1

- old
+ new

@@ -104,12 +104,16 @@ # * properties.@metrics.disk.block # * properties.metrics.@disk.block # * properties.metrics.disk.@block # * metrics.disk.block # - candidates = [(['properties']+parts).join('.')] + parts.collect.with_index{|i,ix| - (['properties']+(ix == 0 ? [] : parts[0..(ix-1)]) + ["@#{i}"] + parts[ix+1..-1]).join('.') + candidates = [(['properties']+parts).join('.')] + + parts.each_index{|ix| + candidates << (['properties']+(ix == 0 ? [] : parts[0..(ix-1)]) + ["@#{parts[ix]}"] + parts[ix+1..-1]).join('.') }.flatten() + + rv = nil # search for the key using science or something candidates.each do |c| rv = report.get(c) break unless rv.nil? \ No newline at end of file