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