Class: Perm::Authorizer
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Perm::Authorizer
- Defined in:
- lib/perm/authorizer.rb
Instance Attribute Summary collapse
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(user) ⇒ Authorizer
constructor
A new instance of Authorizer.
- #method_missing(name, *args) ⇒ Object
- #respond_to?(name) ⇒ Boolean
Constructor Details
#initialize(user) ⇒ Authorizer
Returns a new instance of Authorizer.
7 8 9 |
# File 'lib/perm/authorizer.rb', line 7 def initialize(user) super @user = user end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
11 12 13 14 |
# File 'lib/perm/authorizer.rb', line 11 def method_missing(name, *args) return false if can_method?(name) super end |
Instance Attribute Details
#user ⇒ Object (readonly)
Returns the value of attribute user.
5 6 7 |
# File 'lib/perm/authorizer.rb', line 5 def user @user end |
Instance Method Details
#respond_to?(name) ⇒ Boolean
16 17 18 19 |
# File 'lib/perm/authorizer.rb', line 16 def respond_to?(name) return true if can_method?(name) super end |