Skip to content

Instantly share code, notes, and snippets.

@phildarnowsky
Forked from mattetti/gist:189283
Created September 18, 2009 21:10
Show Gist options
  • Save phildarnowsky/189293 to your computer and use it in GitHub Desktop.
Save phildarnowsky/189293 to your computer and use it in GitHub Desktop.
def summer_monthly_usage
return @summer_monthly_usage if @summer_monthly_usage
monthly_usages = rates.summer_months_nbr.map{|month| monthly_usage[month - 1]}
@summer_monthly_usage = monthly_usages.inject(0){|sum, v| sum += v}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment