Module: BrighterPlanet::Pet::Summarization

Defined in:
lib/pet/summarization.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/pet/summarization.rb', line 4

def self.included(base)
  base.summarize do |has|
    has.adjective lambda { |pet| "#{pet.weight.convert(:kilograms, :pounds).round(1)}-pound"}, :if => :weight
    has.adjective [:gender, :name], :if => :gender
    has.adjective [:breed, :name], :if => :breed
    has.identity [:species, :name], :if => :species
    has.identity
    has.verb :own
  end
end