Skip to content

Instantly share code, notes, and snippets.

@ELLIOTTCABLE
Forked from mattetti/gist:189283
Created September 18, 2009 20:57
Show Gist options
  • Save ELLIOTTCABLE/189288 to your computer and use it in GitHub Desktop.
Save ELLIOTTCABLE/189288 to your computer and use it in GitHub Desktop.
def summer_monthly_usage
@summer_monthly_usage ||= rates.summer_months_nbr.map{|month| monthly_usage[month - 1]}.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