Class: Georgia::Policy
- Inherits:
-
Object
- Object
- Georgia::Policy
- Defined in:
- app/policies/georgia/policy.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Policy
constructor
A new instance of Policy.
Constructor Details
#initialize(*args) ⇒ Policy
Returns a new instance of Policy.
6 7 8 |
# File 'app/policies/georgia/policy.rb', line 6 def initialize *args @controller = args.first end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object (private)
12 13 14 |
# File 'app/policies/georgia/policy.rb', line 12 def method_missing(*args, &block) controller.send(*args, &block) end |
Instance Attribute Details
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
4 5 6 |
# File 'app/policies/georgia/policy.rb', line 4 def controller @controller end |