Class: ResidenceAppliance
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- ResidenceAppliance
- Defined in:
- lib/earth/residence/residence_appliance.rb
Class Method Summary collapse
Class Method Details
.annual_energy_from_electricity_for(appliance_plural) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/earth/residence/residence_appliance.rb', line 5 def annual_energy_from_electricity_for(appliance_plural) appliance_name = appliance_plural.to_s.singularize if appliance = find_by_name(appliance_name) appliance.annual_energy_from_electricity end end |