Class: Rails::Auth::ACL::Matchers::AllowAll
- Inherits:
-
Object
- Object
- Rails::Auth::ACL::Matchers::AllowAll
- Defined in:
- lib/rails/auth/acl/matchers/allow_all.rb
Overview
Allows unauthenticated clients to access to a given resource
Instance Method Summary collapse
-
#attributes ⇒ true, false
Generates inspectable attributes for debugging.
-
#initialize(enabled) ⇒ AllowAll
constructor
A new instance of AllowAll.
- #match(_env) ⇒ Object
Constructor Details
#initialize(enabled) ⇒ AllowAll
Returns a new instance of AllowAll.
10 11 12 13 14 |
# File 'lib/rails/auth/acl/matchers/allow_all.rb', line 10 def initialize(enabled) raise ArgumentError, "enabled must be true/false" unless [true, false].include?(enabled) @enabled = enabled end |
Instance Method Details
#attributes ⇒ true, false
Generates inspectable attributes for debugging
23 24 25 |
# File 'lib/rails/auth/acl/matchers/allow_all.rb', line 23 def attributes @enabled end |
#match(_env) ⇒ Object
16 17 18 |
# File 'lib/rails/auth/acl/matchers/allow_all.rb', line 16 def match(_env) @enabled end |