Sha256: 701080d5408ec1fb5e132511675ee2d17f4877c4966a3387bf02c1cc83a5e184

Contents?: true

Size: 772 Bytes

Versions: 5

Compression:

Stored size: 772 Bytes

Contents

module Goma
  module Models
    extend ActiveSupport::Concern

    # @!parse extend ClassMethods
    module ClassMethods
      # Include {Goma::Models::Authenticatable} and other modules
      # specified in config/initializers/goma.rb file.
      #
      # @param [Symbol] goma_scope If goma_scope is omitted, Goma assumes
      #                            scope by the class name and configuration.
      def goma(goma_scope=nil)
        @goma_scope = goma_scope if goma_scope
        require 'goma/models/authenticatable'
        include Goma::Models::Authenticatable

        (Goma::MODULES & goma_config.modules).each do |mod|
          require "goma/models/#{mod}"
          include Goma::Models.const_get(mod.to_s.classify)
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
goma-0.0.1.rc3 lib/goma/models.rb
goma-0.0.1.rc2 lib/goma/models.rb
goma-0.0.1.rc1 lib/goma/models.rb
goma-0.0.1.gamma lib/goma/models.rb
goma-0.0.1.beta lib/goma/models.rb