Class: DudePolicy::BasePolicy

Inherits:
Object
  • Object
show all
Defined in:
lib/dude_policy/base_policy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource) ⇒ BasePolicy

Returns a new instance of BasePolicy.



5
6
7
# File 'lib/dude_policy/base_policy.rb', line 5

def initialize(resource)
  @resource = resource
end

Instance Attribute Details

#resourceObject (readonly)

Returns the value of attribute resource.



3
4
5
# File 'lib/dude_policy/base_policy.rb', line 3

def resource
  @resource
end

Instance Method Details

#inspectObject



9
10
11
# File 'lib/dude_policy/base_policy.rb', line 9

def inspect
  "<#{self.class.name}##{object_id} resource:#{resource.class.name}>"
end