Module: DudePolicy::HasPolicy
- Defined in:
- lib/dude_policy/has_policy.rb
Instance Method Summary collapse
Instance Method Details
#policy ⇒ Object
3 4 5 |
# File 'lib/dude_policy/has_policy.rb', line 3 def policy @policy ||= policy_name.constantize.new(self) end |
#policy_name ⇒ Object
7 8 9 |
# File 'lib/dude_policy/has_policy.rb', line 7 def policy_name "#{self.class.name}Policy" end |