Sha256: 996f2e23b9c0646689d1e5ca5b227d960768dc29d828e754dc444cba324c0a2c

Contents?: true

Size: 712 Bytes

Versions: 7

Compression:

Stored size: 712 Bytes

Contents

require 'summary_judgement'

module BrighterPlanet
  module Purchase
    module Summarization
      def self.included(base)
        base.extend SummaryJudgement
        base.summarize do |has|
          has.identity 'purchase'

          has.verb :take
          has.aspect :perfect

          has.modifier lambda { |purchase| "from #{flight.merchant}" }, :if => :merchant
          has.modifier lambda { |purchase| "(#{purchase.inudstry} industry)" }, :if => :industry
          has.modifier lambda { |purchase| "for $#{purchase.purchase_amount}" }, :if => :purchase_amount
          has.modifier lambda { |purchase| "on #{date.to_formatted_s(:archive)}" }, :if => :date
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
purchase-0.1.2 lib/purchase/summarization.rb
purchase-0.1.1 lib/purchase/summarization.rb
purchase-0.1.0 lib/purchase/summarization.rb
purchase-0.0.4 lib/purchase/summarization.rb
purchase-0.0.3 lib/purchase/summarization.rb
purchase-0.0.2 lib/purchase/summarization.rb
purchase-0.0.1 lib/purchase/summarization.rb