Module: Authoryze
- Extended by:
- Forwardable
- Defined in:
- lib/authoryze.rb,
lib/authoryze/rails.rb,
lib/authoryze/version.rb,
lib/authoryze/exceptions.rb,
lib/authoryze/rails/filter.rb,
lib/authoryze/configuration.rb,
lib/authoryze/rails/can_filter.rb,
lib/authoryze/rails/authoryze_filter.rb,
lib/authoryze/rails/controller_extensions.rb
Defined Under Namespace
Modules: Rails Classes: AccessDenied, Configuration
Constant Summary collapse
- VERSION =
"0.0.3"
Class Method Summary collapse
-
.configuration ⇒ Object
Returns the global configuration, or initializes a new configuration object if it doesn’t exist yet.
-
.configure {|configuration| ... } ⇒ Object
Yields the global configuration to a block.
- .reset! ⇒ Object
Class Method Details
.configuration ⇒ Object
Returns the global configuration, or initializes a new configuration object if it doesn’t exist yet.
18 19 20 |
# File 'lib/authoryze.rb', line 18 def configuration @configuration ||= Authoryze::Configuration.new end |
.configure {|configuration| ... } ⇒ Object
Yields the global configuration to a block.
31 32 33 34 35 36 |
# File 'lib/authoryze.rb', line 31 def configure(&block) unless block_given? raise ArgumentError.new("You tried to .configure without a block!") end yield configuration end |
.reset! ⇒ Object
38 39 40 |
# File 'lib/authoryze.rb', line 38 def reset! @configuration = nil end |