Class: Georgia::Policy

Inherits:
Object
  • Object
show all
Defined in:
app/policies/georgia/policy.rb

Direct Known Subclasses

RevisionPolicy

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#controllerObject (readonly)

Returns the value of attribute controller.



4
5
6
# File 'app/policies/georgia/policy.rb', line 4

def controller
  @controller
end