Sha256: 3753e3e65e24960e73b61419b2112b83235094b2fe3d9eebe5c4cfda6bade3c5
Contents?: true
Size: 443 Bytes
Versions: 19
Compression:
Stored size: 443 Bytes
Contents
class ResidenceAppliance < ActiveRecord::Base set_primary_key :name class << self 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 end col :name col :annual_energy_from_electricity, :type => :float col :annual_energy_from_electricity_units end
Version data entries
19 entries across 19 versions & 1 rubygems