Skip to content

Instantly share code, notes, and snippets.

@richkilmer
Forked from mattetti/gist:189283
Created September 18, 2009 21:24
Show Gist options
  • Save richkilmer/189302 to your computer and use it in GitHub Desktop.
Save richkilmer/189302 to your computer and use it in GitHub Desktop.
def summer_monthly_usage
@summer_monthly_usage ||= monthly_usage_summary(rates.summer_months_nbr)
end
private
def monthly_usage_summary(months)
months.inject(0) { |sum, m| sum + monthly_usage[m - 1] }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment