lib/flight/summarization.rb in flight-0.0.9 vs lib/flight/summarization.rb in flight-0.0.10
- old
+ new
@@ -2,9 +2,10 @@
module BrighterPlanet
module Flight
module Summarization
def self.included(base)
+ base.extend SummaryJudgement
base.summarize do |has|
has.adjective 'one-way', :if => lambda { |flight| flight.trips == 1 }
has.adjective 'round-trip', :if => lambda { |flight| flight.trips == 1 }
has.adjective 'nonstop', :if => lambda { |flight| flight.emplanements_per_trip == 1 }
has.identity 'flight'