Class: WeirdInteractor::BaseAuthenticated

Inherits:
Base
  • Object
show all
Defined in:
lib/weird_interactor/base_authenticated.rb

Overview

Base interactor for actions requiring user to be authenticated.

Instance Attribute Summary collapse

Attributes inherited from Base

#params

Instance Method Summary collapse

Methods inherited from Base

#on, #publish, #registered_events

Constructor Details

#initialize(params, current_user) ⇒ BaseAuthenticated

Returns a new instance of BaseAuthenticated.

Parameters:

  • params (ActionController::Parameters)
  • current_user (User)


8
9
10
11
# File 'lib/weird_interactor/base_authenticated.rb', line 8

def initialize(params, current_user)
  super(params)
  @current_user = current_user
end

Instance Attribute Details

#current_userObject (readonly)

Returns the value of attribute current_user.



4
5
6
# File 'lib/weird_interactor/base_authenticated.rb', line 4

def current_user
  @current_user
end