Class: ActivityPermissionEngine::ActivitiesRegistry

Inherits:
Object
  • Object
show all
Defined in:
lib/activity_permission_engine/activities_registry.rb

Instance Method Summary collapse

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

#allObject



7
8
9
# File 'lib/activity_permission_engine/activities_registry.rb', line 7

def all
  activities
end