Sha256: 1016970be964956f325460f5aa0b2dc467dd78c0e1f3dbb6b1924a95f9bd24b0

Contents?: true

Size: 606 Bytes

Versions: 19

Compression:

Stored size: 606 Bytes

Contents

class DietClass < ActiveRecord::Base
  set_primary_key :name
  
  class << self
    def fallback
      find_by_name 'standard'
    end
  end
  
  col :name
  col :intensity, :type => :float
  col :intensity_units
  col :red_meat_share, :type => :float
  col :poultry_share, :type => :float
  col :fish_share, :type => :float
  col :eggs_share, :type => :float
  col :nuts_share, :type => :float
  col :dairy_share, :type => :float
  col :cereals_and_grains_share, :type => :float
  col :fruit_share, :type => :float
  col :vegetables_share, :type => :float
  col :oils_and_sugars_share, :type => :float
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
earth-0.11.10 lib/earth/diet/diet_class.rb
earth-0.11.9 lib/earth/diet/diet_class.rb
earth-0.11.8 lib/earth/diet/diet_class.rb
earth-0.11.7 lib/earth/diet/diet_class.rb
earth-0.11.6 lib/earth/diet/diet_class.rb
earth-0.11.5 lib/earth/diet/diet_class.rb
earth-0.11.4 lib/earth/diet/diet_class.rb
earth-0.11.3 lib/earth/diet/diet_class.rb
earth-0.11.2 lib/earth/diet/diet_class.rb
earth-0.11.1 lib/earth/diet/diet_class.rb
earth-0.11.0 lib/earth/diet/diet_class.rb
earth-0.7.0 lib/earth/diet/diet_class.rb
earth-0.6.6 lib/earth/diet/diet_class.rb
earth-0.6.5 lib/earth/diet/diet_class.rb
earth-0.6.4 lib/earth/diet/diet_class.rb
earth-0.6.3 lib/earth/diet/diet_class.rb
earth-0.6.2 lib/earth/diet/diet_class.rb
earth-0.6.1 lib/earth/diet/diet_class.rb
earth-0.6.0 lib/earth/diet/diet_class.rb