Sha256: f5c20144133563ab0c1e4c9a50a02bc9a7a9e15e43b407b3190a21e6efc1e2c5

Contents?: true

Size: 552 Bytes

Versions: 9

Compression:

Stored size: 552 Bytes

Contents

require 'summary_judgement'

module BrighterPlanet
  module BusTrip
    module Summarization
      def self.included(base)
        base.extend SummaryJudgement
        base.summarize do |has|
          has.adjective lambda { |bus_trip| "#{bus_trip.distance_estimate_in_miles.adaptive_round(1)}-mile" }, :if => :distance_estimate
          has.adjective lambda { |bus_trip| "#{bus_trip.duration}-minute" }, :if => :duration
          has.identity 'bus trip'
          has.verb :take
          has.aspect :perfect
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
bus_trip-0.0.10 lib/bus_trip/summarization.rb
bus_trip-0.0.9 lib/bus_trip/summarization.rb
bus_trip-0.0.8 lib/bus_trip/summarization.rb
bus_trip-0.0.7 lib/bus_trip/summarization.rb
bus_trip-0.0.6 lib/bus_trip/summarization.rb
bus_trip-0.0.5 lib/bus_trip/summarization.rb
bus_trip-0.0.4 lib/bus_trip/summarization.rb
bus_trip-0.0.3 lib/bus_trip/summarization.rb
bus_trip-0.0.2 lib/bus_trip/summarization.rb