Module: BrighterPlanet::Diet::Summarization
- Defined in:
- lib/diet/summarization.rb
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/diet/summarization.rb', line 4 def self.included(base) base.summarize do |has| has.adjective lambda { |diet| "#{diet.size}-calorie" }, :if => :size has.adjective 'local', :if => :local? has.adjective 'organic', :if => :organic? has.adjective [:diet_class, :name], :if => :diet_class has.identity has.verb :have end end |