lib/rail_trip/characterization.rb in rail_trip-0.0.10 vs lib/rail_trip/characterization.rb in rail_trip-0.0.11
- old
+ new
@@ -1,9 +1,7 @@
# Rail trip's characterization is implemented using a domain-specific language
# provided by [Characterizable](http://github.com/seamusabshere/characterizable).
-require 'characterizable'
-
module BrighterPlanet
module RailTrip
#### Rail trip: characterization
# This module is used by [Brighter Planet](http://brighterplanet.com)'s
@@ -16,11 +14,10 @@
# * [Source code](http://github.com/brighterplanet/rail_trip)
#
module Characterization
def self.included(base)
##### The characterization
- base.send :include, Characterizable
# This `characterize` block encapsulates the characterization. Typically
# emitter models will be backed by ActiveRecord, which will provide
# these attributes accessors based on database schema. The characteristics
# listed here define the standard public API to RailTrip.
@@ -29,10 +26,9 @@
has :duration, :measures => :time
has :distance_estimate, :trumps => :duration, :measures => :length
end
# Additional characteristics are gleaned from the carbon model.
- base.add_implicit_characteristics
end
end
end
end