Sha256: e118f7a411d3713ee7037644f1a350bd686027ff6524483402cb79e53ebabf9a

Contents?: true

Size: 639 Bytes

Versions: 16

Compression:

Stored size: 639 Bytes

Contents

class ComputationCarrier < ActiveRecord::Base
  set_primary_key :name
  
  falls_back_on :name => 'fallback',
                :power_usage_effectiveness => lambda { ComputationCarrier.maximum('power_usage_effectiveness') }
  
  col :name
  col :power_usage_effectiveness, :type => :float
  
  # verify "Power usage effectiveness should be one or more" do
  #   ComputationCarrier.all.each do |carrier|
  #     unless carrier.power_usage_effectiveness >= 1.0
  #       raise "Invalid power usage effectiveness for ComputationCarrier #{carrier.name}: #{carrier.power_usage_effectiveness} (should be >= 1.0)"
  #     end
  #   end
  # end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
earth-0.11.7 lib/earth/computation/computation_carrier.rb
earth-0.11.6 lib/earth/computation/computation_carrier.rb
earth-0.11.5 lib/earth/computation/computation_carrier.rb
earth-0.11.4 lib/earth/computation/computation_carrier.rb
earth-0.11.3 lib/earth/computation/computation_carrier.rb
earth-0.11.2 lib/earth/computation/computation_carrier.rb
earth-0.11.1 lib/earth/computation/computation_carrier.rb
earth-0.11.0 lib/earth/computation/computation_carrier.rb
earth-0.7.0 lib/earth/computation/computation_carrier.rb
earth-0.6.6 lib/earth/computation/computation_carrier.rb
earth-0.6.5 lib/earth/computation/computation_carrier.rb
earth-0.6.4 lib/earth/computation/computation_carrier.rb
earth-0.6.3 lib/earth/computation/computation_carrier.rb
earth-0.6.2 lib/earth/computation/computation_carrier.rb
earth-0.6.1 lib/earth/computation/computation_carrier.rb
earth-0.6.0 lib/earth/computation/computation_carrier.rb