Class: UserDestroy

Inherits:
Object
  • Object
show all
Defined in:
app/interactors/user_destroy.rb

Instance Method Summary collapse

Constructor Details

#initialize(user) ⇒ UserDestroy

Returns a new instance of UserDestroy


2
3
4
# File 'app/interactors/user_destroy.rb', line 2

def initialize(user)
  @user = user
end

Instance Method Details

#destroyObject


6
7
8
9
# File 'app/interactors/user_destroy.rb', line 6

def destroy
  @user.destroy
  @user.watchers.each(&:destroy)
end