Class: Polar::DefaultPermissions
- Inherits:
-
Object
- Object
- Polar::DefaultPermissions
- Defined in:
- lib/polar/permissions.rb
Class Method Summary collapse
-
.instance ⇒ Object
Protects from creating more than one instance of this class.
Instance Method Summary collapse
-
#method_missing(method, *params) ⇒ Object
This method is executed whenever a default permission is defined in subject’s model.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *params) ⇒ Object
This method is executed whenever a default permission is defined in subject’s model
6 7 8 9 |
# File 'lib/polar/permissions.rb', line 6 def method_missing(method, *params) Permissions.instance.subject_store << method.to_sym self end |
Class Method Details
.instance ⇒ Object
Protects from creating more than one instance of this class
12 13 14 |
# File 'lib/polar/permissions.rb', line 12 def self.instance @__instance__ ||= new end |