Sha256: 55dabdcaf03b241bf4fb577370a88710e72e04814537d00e9de8e1d2eee4de37

Contents?: true

Size: 482 Bytes

Versions: 3

Compression:

Stored size: 482 Bytes

Contents

module BrighterPlanet
  module Pet
    module Summarization
      def self.included(base)
        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

3 entries across 3 versions & 1 rubygems

Version Path
pet-0.0.13 lib/pet/summarization.rb
pet-0.0.12 lib/pet/summarization.rb
pet-0.0.11 lib/pet/summarization.rb