Sha256: 7c0f9fbb51e19572676ccc7aef83e3ce915c0584f730de6601453342d03bc7bf

Contents?: true

Size: 669 Bytes

Versions: 10

Compression:

Stored size: 669 Bytes

Contents

require 'earth/locality'
class ComputationCarrier < ActiveRecord::Base
  self.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

10 entries across 10 versions & 1 rubygems

Version Path
earth-0.11.20 lib/earth/computation/computation_carrier.rb
earth-0.11.19 lib/earth/computation/computation_carrier.rb
earth-0.11.18 lib/earth/computation/computation_carrier.rb
earth-0.11.17 lib/earth/computation/computation_carrier.rb
earth-0.11.16 lib/earth/computation/computation_carrier.rb
earth-0.11.15 lib/earth/computation/computation_carrier.rb
earth-0.11.14 lib/earth/computation/computation_carrier.rb
earth-0.11.13 lib/earth/computation/computation_carrier.rb
earth-0.11.12 lib/earth/computation/computation_carrier.rb
earth-0.11.11 lib/earth/computation/computation_carrier.rb