Sha256: 7e649dad85352a6860fe45ebcf50317faf2a6376d8af2ef34160294cc9089f35

Contents?: true

Size: 878 Bytes

Versions: 4

Compression:

Stored size: 878 Bytes

Contents

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

module Ecm
  module Core
    module Backend
      module Configuration
        def configure
          yield self
        end

        mattr_accessor :registered_controllers do
          lambda do
            [
              # Ecm::Contact::Backend::FoosController
            ]
          end
        end

        mattr_accessor :registered_services do
          lambda do
            []
          end
        end

        mattr_accessor(:enable_active_storage_backend) { false }

        def self.registered_controllers
          if enable_active_storage_backend
            @@registered_controllers
          else
            -> { @@registered_controllers.call.reject { |c| c.name =~ /.*ActiveStorage.*/ } }
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ecm_core-0.2.2 lib/ecm/core/backend/configuration.rb
ecm_core-0.2.1 lib/ecm/core/backend/configuration.rb
ecm_core-0.2.0 lib/ecm/core/backend/configuration.rb
ecm_core-0.1.0 lib/ecm/core/backend/configuration.rb