Module: DudePolicy::HasPolicy

Defined in:
lib/dude_policy/has_policy.rb

Instance Method Summary collapse

Instance Method Details

#policyObject



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

def policy
  @policy ||= policy_name.constantize.new(self)
end

#policy_nameObject



7
8
9
# File 'lib/dude_policy/has_policy.rb', line 7

def policy_name
  "#{self.class.name}Policy"
end