Class: Action::User::SyncProjects

Inherits:
Object
  • Object
show all
Includes:
InchCI::Action
Defined in:
app/services/action/user/sync_projects.rb

Constant Summary collapse

DEFAULT_TAB =
Action::User::Show::DEFAULT_TAB

Instance Method Summary collapse

Methods included from InchCI::Action

#exposures, included

Constructor Details

#initialize(current_user, params) ⇒ SyncProjects

Returns a new instance of SyncProjects.


12
13
14
15
16
17
# File 'app/services/action/user/sync_projects.rb', line 12

def initialize(current_user, params)
  @user = UserPresenter.new(current_user)
  @languages = Action::User::Show::LANGUAGES
  @projects = retrieve_projects(current_user).map { |p| ProjectPresenter.new(p) }
  @active_tab = params[:tab] || DEFAULT_TAB
end