Sha256: 3f9f4105e84905a694f0266960b46b60c1bdaeed83091c0a1b842e51fcc8fc9f

Contents?: true

Size: 857 Bytes

Versions: 6

Compression:

Stored size: 857 Bytes

Contents

module BrighterPlanet
  module Residence
    extend self

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

      require 'residence/carbon_model'
      require 'residence/characterization'
      require 'residence/data'
      require 'residence/summarization'

      base.send :include, BrighterPlanet::Residence::CarbonModel
      base.send :include, BrighterPlanet::Residence::Characterization
      base.send :include, BrighterPlanet::Residence::Data
      base.send :include, BrighterPlanet::Residence::Summarization
    end
    def residence_model
      if Object.const_defined? 'Residence'
        ::Residence
      elsif Object.const_defined? 'ResidenceRecord'
        ResidenceRecord
      else
        raise 'There is no residence model'
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
residence-0.0.9 lib/residence.rb
residence-0.0.8 lib/residence.rb
residence-0.0.7 lib/residence.rb
residence-0.0.6 lib/residence.rb
residence-0.0.5 lib/residence.rb
residence-0.0.4 lib/residence.rb