Sha256: 8a3308931b95d0bbba6c812dc6fae642b3b627a3a4e64ebe09e73413cf47a410
Contents?: true
Size: 714 Bytes
Versions: 21
Compression:
Stored size: 714 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 #{purchase.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
21 entries across 21 versions & 1 rubygems