Sha256: 07d3a1640d13460a3da26f5e876525f35d732f06eb8923e2c83b251332de4326
Contents?: true
Size: 548 Bytes
Versions: 8
Compression:
Stored size: 548 Bytes
Contents
require 'summary_judgement' module BrighterPlanet module Pet module Summarization def self.included(base) base.extend SummaryJudgement base.summarize do |has| has.adjective lambda { |pet| "#{pet.weight_in_pounds.adaptive_round}-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 end end end
Version data entries
8 entries across 8 versions & 1 rubygems