Class: ActivityPermissionEngine::RegisterActivity

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

Defined Under Namespace

Classes: Request, Response

Instance Method Summary collapse

Constructor Details

#initialize(request, activity_registry = ActivityPermissionEngine.configuration.activities_registry) ⇒ RegisterActivity

Returns a new instance of RegisterActivity.



3
4
5
6
# File 'lib/activity_permission_engine/register_activity.rb', line 3

def initialize(request, activity_registry = ActivityPermissionEngine.configuration.activities_registry)
  @request = request
  @activity_registry = activity_registry
end

Instance Method Details

#callObject



8
9
10
# File 'lib/activity_permission_engine/register_activity.rb', line 8

def call
  Response.new(activity_registry.add(request.activity_ref))
end