# File lib/rhc/rest/cartridge.rb, line 57 def usage_rate rate = attribute(:usage_rate_usd) if attribute(:usage_rates) rate ||= attribute(:usage_rates).inject(0) { |total, rate| total + rate['usd'].to_f } end rate.to_f rescue 0.0 end