Sha256: 68ee8880546072885b4a09e7a23c42eeef0d75b13398ed16362c97be11859608

Contents?: true

Size: 441 Bytes

Versions: 65

Compression:

Stored size: 441 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

  data_miner do
    tap "Brighter Planet's residence appliance energy information", Earth.taps_server
  end
end

Version data entries

65 entries across 65 versions & 2 rubygems

Version Path
earth-0.0.32 lib/earth/residence/residence_appliance.rb
earth-0.0.31 lib/earth/residence/residence_appliance.rb
earth-0.0.30 lib/earth/residence/residence_appliance.rb
earth-0.0.29 lib/earth/residence/residence_appliance.rb
earth-0.0.28 lib/earth/residence/residence_appliance.rb