Sha256: 557bd9e24fbac3f5420c9e50abc29820cad7eb36c86a0bc32306b7bc4c933cb0

Contents?: true

Size: 872 Bytes

Versions: 5

Compression:

Stored size: 872 Bytes

Contents

module BrighterPlanet
  module Motorcycle
    extend self

    def included(base)
      require 'cohort_scope'
      require 'falls_back_on'
      require 'falls_back_on/active_record_ext'

      require 'motorcycle/carbon_model'
      require 'motorcycle/characterization'
      require 'motorcycle/data'
      require 'motorcycle/summarization'

      base.send :include, BrighterPlanet::Motorcycle::CarbonModel
      base.send :include, BrighterPlanet::Motorcycle::Characterization
      base.send :include, BrighterPlanet::Motorcycle::Data
      base.send :include, BrighterPlanet::Motorcycle::Summarization
    end
    def motorcycle_model
      if Object.const_defined? 'Motorcycle'
        ::Motorcycle
      elsif Object.const_defined? 'MotorcycleRecord'
        MotorcycleRecord
      else
        raise 'There is no motorcycle model'
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
motorcycle-0.0.7 lib/motorcycle.rb
motorcycle-0.0.6 lib/motorcycle.rb
motorcycle-0.0.5 lib/motorcycle.rb
motorcycle-0.0.4 lib/motorcycle.rb
motorcycle-0.0.3 lib/motorcycle.rb