Sha256: 4b985181d96359313ff4943d18bab43823dfef08fa858d71db552c075f2a06f3

Contents?: true

Size: 607 Bytes

Versions: 1

Compression:

Stored size: 607 Bytes

Contents

module Transit
  module Package
    autoload :Base,   'transit/package/base'
    autoload :Post,   'transit/package/post'
    autoload :Page,   'transit/package/page'
    
    module Hook
      def transit(template, options = {})
        
        include Transit::Package::Base
        self.transit_config.merge!(options)
        configure_transit_package!
                
        include Transit::Package.const_get(template.to_s.classify)
        Transit.track(self, template.to_sym)
        
      end
    end
  end
end


Mongoid::Document::ClassMethods.class_eval do
  include Transit::Package::Hook
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
transit-0.0.1 lib/transit/package.rb