class Ddr::Auth::AbstractAbility
@abstract
Attributes
auth_context[R]
Public Class Methods
new(auth_context)
click to toggle source
# File lib/ddr/auth/abstract_ability.rb, line 26 def initialize(auth_context) @auth_context = auth_context if exclude_default_aliases clear_aliased_actions end apply_ability_definitions end
Public Instance Methods
cache()
click to toggle source
# File lib/ddr/auth/abstract_ability.rb, line 34 def cache @cache ||= {} end
Private Instance Methods
apply(ability_def)
click to toggle source
# File lib/ddr/auth/abstract_ability.rb, line 44 def apply(ability_def) ability_def.call(self) end
apply_ability_definitions()
click to toggle source
# File lib/ddr/auth/abstract_ability.rb, line 40 def apply_ability_definitions ability_definitions.reduce(self, :apply) end