Sha256: 7536e8bbbf85263199f6f188b0fcbd155cd50264a3b15888f3ac56777dd6d7ac

Contents?: true

Size: 530 Bytes

Versions: 7

Compression:

Stored size: 530 Bytes

Contents

require "active_support/concern"

module Iqvoc
  module Configuration
    module Label
      extend ActiveSupport::Concern

      included do
        mattr_accessor :base_class_name
        self.base_class_name        = 'Label::SKOS::Base'
      end

      module ClassMethods
        # Do not use the following method in models. This will probably cause a
        # loading loop (something like "expected file xyz to load ...")
        def base_class
          base_class_name.constantize
        end
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
iqvoc-4.0.2 lib/iqvoc/configuration/label.rb
iqvoc-4.0.1 lib/iqvoc/configuration/label.rb
iqvoc-4.0.0 lib/iqvoc/configuration/label.rb
iqvoc-3.5.7 lib/iqvoc/configuration/label.rb
iqvoc-3.5.6 lib/iqvoc/configuration/label.rb
iqvoc-3.5.5 lib/iqvoc/configuration/label.rb
iqvoc-3.5.4 lib/iqvoc/configuration/label.rb