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