Module: BrighterPlanet::Diet::Characterization

Defined in:
lib/diet/characterization.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/diet/characterization.rb', line 4

def self.included(base)
  base.characterize do
    has :diet_class
    has :red_meat_share, :trumps => :diet_class
    has :poultry_share, :trumps => :diet_class
    has :fish_share, :trumps => :diet_class
    has :eggs_share, :trumps => :diet_class
    has :nuts_share, :trumps => :diet_class
    has :dairy_share, :trumps => :diet_class
    has :cereals_and_grains_share, :trumps => :diet_class
    has :fruit_share, :trumps => :diet_class
    has :vegetables_share, :trumps => :diet_class
    has :oils_and_sugars_share, :trumps => :diet_class
    has :size # TODO more standard unit?
    has :proximity, :measures => :percentage # impotent for now
    has :conventionality, :measures => :percentage # impotent for now
    has :start_date do |start_date|
      start_date.reveals :end_date
    end
  end
end