Class: DudePolicy::BasePolicy
- Inherits:
-
Object
- Object
- DudePolicy::BasePolicy
- Defined in:
- lib/dude_policy/base_policy.rb
Instance Attribute Summary collapse
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
Instance Method Summary collapse
-
#initialize(resource) ⇒ BasePolicy
constructor
A new instance of BasePolicy.
- #inspect ⇒ Object
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
#resource ⇒ Object (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
#inspect ⇒ Object
9 10 11 |
# File 'lib/dude_policy/base_policy.rb', line 9 def inspect "<#{self.class.name}##{object_id} resource:#{resource.class.name}>" end |