Class: Ddr::Auth::AbilityDefinitions Abstract
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Ddr::Auth::AbilityDefinitions
- Defined in:
- lib/ddr/auth/ability_definitions.rb
Overview
This class is abstract.
A class which applies ability definitions to the delegated ability class when ‘#call` is invoked.
Direct Known Subclasses
AliasAbilityDefinitions, AttachmentAbilityDefinitions, CollectionAbilityDefinitions, ComponentAbilityDefinitions, DatastreamAbilityDefinitions, EventAbilityDefinitions, ItemAbilityDefinitions, LockAbilityDefinitions, PublicationAbilityDefinitions, RoleBasedAbilityDefinitions, SuperuserAbilityDefinitions
Class Method Summary collapse
-
.call(ability) ⇒ Object
Applies ability definitions to the ability and return it.
Instance Method Summary collapse
-
#call ⇒ Object
Applies abilities definitions with ‘can` and `cannot`.
Class Method Details
.call(ability) ⇒ Object
Applies ability definitions to the ability and return it
14 15 16 17 |
# File 'lib/ddr/auth/ability_definitions.rb', line 14 def self.call(ability) new(ability).call ability end |
Instance Method Details
#call ⇒ Object
Applies abilities definitions with ‘can` and `cannot`.
20 21 22 |
# File 'lib/ddr/auth/ability_definitions.rb', line 20 def call raise NotImplementedError, "Subclasses must implement `#call`." end |