Module: Restrict

Defined in:
lib/restrict.rb,
lib/restrict/error.rb,
lib/restrict/version.rb,
lib/restrict/gatekeeper.rb,
lib/restrict/restriction.rb,
lib/restrict/access_denied.rb,
lib/restrict/configuration.rb,
lib/restrict/rails/railtie.rb,
lib/restrict/login_required.rb,
lib/restrict/rails/controller.rb,
lib/restrict/already_restricted_error.rb

Defined Under Namespace

Modules: Rails Classes: AccessDenied, AlreadyRestrictedError, Configuration, Error, Gatekeeper, LoginRequired, Restriction

Constant Summary collapse

VERSION =
"0.2.1"

Class Method Summary collapse

Class Method Details

.config(&block) ⇒ Object


16
17
18
19
# File 'lib/restrict.rb', line 16

def self.config(&block)
  @configuration ||= Restrict::Configuration.new
  block_given? ? yield(@configuration) : @configuration
end