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

Version Path
pet-0.0.10 lib/pet/summarization.rb
pet-0.0.9 lib/pet/summarization.rb
pet-0.0.8 lib/pet/summarization.rb
pet-0.0.7 lib/pet/summarization.rb
pet-0.0.6 lib/pet/summarization.rb
pet-0.0.5 lib/pet/summarization.rb
pet-0.0.4 lib/pet/summarization.rb
pet-0.0.3 lib/pet/summarization.rb