Class: ActivityPermissionEngine::ActivitiesRegistry
- Inherits:
-
Object
- Object
- ActivityPermissionEngine::ActivitiesRegistry
- Defined in:
- lib/activity_permission_engine/activities_registry.rb
Instance Method Summary collapse
- #add(activity_refs) ⇒ Object
- #all ⇒ Object
-
#initialize(activities) ⇒ ActivitiesRegistry
constructor
A new instance of ActivitiesRegistry.
Constructor Details
#initialize(activities) ⇒ ActivitiesRegistry
Returns a new instance of ActivitiesRegistry.
3 4 5 |
# File 'lib/activity_permission_engine/activities_registry.rb', line 3 def initialize(activities) @activities = activities end |
Instance Method Details
#add(activity_refs) ⇒ Object
11 12 13 14 15 |
# File 'lib/activity_permission_engine/activities_registry.rb', line 11 def add(activity_refs) activities << activity_refs activities.uniq! true end |
#all ⇒ Object
7 8 9 |
# File 'lib/activity_permission_engine/activities_registry.rb', line 7 def all activities end |