Sha256: e4d109dd0ebe373be0b6d6d4b4fc544edb5165099863cfd8d38c66b2aabbbfdb

Contents?: true

Size: 486 Bytes

Versions: 4

Compression:

Stored size: 486 Bytes

Contents

module BrighterPlanet
  module BusTrip
    module Summarization
      def self.included(base)
        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

4 entries across 4 versions & 1 rubygems

Version Path
bus_trip-0.0.14 lib/bus_trip/summarization.rb
bus_trip-0.0.13 lib/bus_trip/summarization.rb
bus_trip-0.0.12 lib/bus_trip/summarization.rb
bus_trip-0.0.11 lib/bus_trip/summarization.rb