Class: Authmagic::Modules::Authorization
- Inherits:
-
Object
- Object
- Authmagic::Modules::Authorization
- Defined in:
- lib/authmagic/rails/modules/authorization.rb
Overview
A simple authorization framework for Rails.
- DEPENDENCIES
-
application_framework
Defined Under Namespace
Modules: ControllerClassMethods, ControllerMethods
Constant Summary collapse
- DEPENDENCIES =
[:application_framework].freeze
Instance Method Summary collapse
- #enroll ⇒ Object
-
#initialize(context) ⇒ Authorization
constructor
A new instance of Authorization.
Constructor Details
#initialize(context) ⇒ Authorization
Returns a new instance of Authorization.
7 8 9 10 |
# File 'lib/authmagic/rails/modules/authorization.rb', line 7 def initialize(context) @context = context @context.config. = Config.new(:allow_guest => false) end |
Instance Method Details
#enroll ⇒ Object
12 13 14 |
# File 'lib/authmagic/rails/modules/authorization.rb', line 12 def enroll @context.config.application_controller.send(:include, ControllerMethods) end |