Class: Issues::ImportCsvService

Inherits:
Object
  • Object
show all
Defined in:
app/services/issues/import_csv_service.rb

Instance Method Summary collapse

Constructor Details

#initialize(user, project, csv_io) ⇒ ImportCsvService

Returns a new instance of ImportCsvService.


5
6
7
8
9
10
# File 'app/services/issues/import_csv_service.rb', line 5

def initialize(user, project, csv_io)
  @user = user
  @project = project
  @csv_io = csv_io
  @results = { success: 0, error_lines: [], parse_error: false }
end

Instance Method Details

#executeObject


12
13
14
15
16
17
# File 'app/services/issues/import_csv_service.rb', line 12

def execute
  process_csv
  email_results_to_user

  @results
end