Sha256: a5b43fec3b4f21712e90badcfe1a884083b7e29ea7d68e48121ace2a0752980d

Contents?: true

Size: 722 Bytes

Versions: 2

Compression:

Stored size: 722 Bytes

Contents

require 'active_support/core_ext/module/delegation'
require 'active_support/core_ext/module/attribute_accessors'
require 'active_support/hash_with_indifferent_access'

module Ecm::Staff
  module Configuration
    def configure
      yield self
    end # def

    mattr_accessor :default_markup_language
    @@default_markup_language = nil

    mattr_accessor :markup_languages
    @@markup_languages = []

    mattr_accessor :person_class_name
    @@person_class_name = 'Person'

    def self.person_class_name=(class_name)
      raise PersonClassNotDefinedError unless Object.const_defined?(class_name)
      @@person_class_name = class_name.constantize
    end # def
  end # module Configuration
end # module Ecm::Staff

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ecm_staff-0.0.2.pre lib/ecm/staff/configuration.rb
ecm_staff-0.0.1.pre lib/ecm/staff/configuration.rb