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 27
def initialize(auth_context)
  @auth_context = auth_context
  if exclude_default_aliases
    clear_aliased_actions
  end
  apply_ability_definitions
end

Public Instance Methods

apply(ability_def) click to toggle source
# File lib/ddr/auth/abstract_ability.rb, line 43
def apply(ability_def)
  ability_def.call(self)
end
apply_ability_definitions() click to toggle source
# File lib/ddr/auth/abstract_ability.rb, line 39
def apply_ability_definitions
  ability_definitions.reduce(self, :apply)
end
cache() click to toggle source
# File lib/ddr/auth/abstract_ability.rb, line 35
def cache
  @cache ||= {}
end