Sha256: b6c9446f9e0ec9e7c87925ec258b8459712f01ec29f5d75c453cfb7197a3258d

Contents?: true

Size: 781 Bytes

Versions: 14

Compression:

Stored size: 781 Bytes

Contents

require 'active_support/concern'

module Iqvoc
  module Configuration
    module Collection
      extend ActiveSupport::Concern

      included do
        Iqvoc.first_level_class_configuration_modules << self

        mattr_accessor :base_class_name, :member_class_name, :note_class_names

        self.base_class_name = 'Collection::SKOS::Unordered'

        self.member_class_name  = 'Collection::Member::SKOS::Base'

        self.note_class_names = [ 'Note::SKOS::Definition' ]
      end

      module ClassMethods
        def base_class
          base_class_name.constantize
        end

        def member_class
          member_class_name.constantize
        end

        def note_classes
          note_class_names.map(&:constantize)
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
iqvoc-4.11.1 lib/iqvoc/configuration/collection.rb
iqvoc-4.11.0 lib/iqvoc/configuration/collection.rb
iqvoc-4.10.0 lib/iqvoc/configuration/collection.rb
iqvoc-4.9.0 lib/iqvoc/configuration/collection.rb
iqvoc-4.8.2 lib/iqvoc/configuration/collection.rb
iqvoc-4.8.1 lib/iqvoc/configuration/collection.rb
iqvoc-4.8.0 lib/iqvoc/configuration/collection.rb
iqvoc-4.7.0 lib/iqvoc/configuration/collection.rb
iqvoc-4.6.1 lib/iqvoc/configuration/collection.rb
iqvoc-4.5.2 lib/iqvoc/configuration/collection.rb
iqvoc-4.6.0 lib/iqvoc/configuration/collection.rb
iqvoc-4.5.1 lib/iqvoc/configuration/collection.rb
iqvoc-4.5.0 lib/iqvoc/configuration/collection.rb
iqvoc-4.4.0 lib/iqvoc/configuration/collection.rb