Class: Artisan::Activity::ActivityInteractor

Inherits:
Object
  • Object
show all
Defined in:
lib/artisan/activity/activity_interactor.rb

Instance Method Summary collapse

Constructor Details

#initialize(project_id, user) ⇒ ActivityInteractor

Returns a new instance of ActivityInteractor.



6
7
8
9
# File 'lib/artisan/activity/activity_interactor.rb', line 6

def initialize(project_id, user)
  @project_id = project_id
  @user = user
end

Instance Method Details

#changesObject



11
12
13
14
15
# File 'lib/artisan/activity/activity_interactor.rb', line 11

def changes
  project_changes = ::Change.find_all_by_project_id(@project_id)
  project = Projects::ProjectsInteractor.new(@user).find(@project_id)
  return ActivityPresenter.new(project_changes, project)
end