Class: Issuable::ImportCsv::BaseService

Inherits:
Object
  • Object
show all
Defined in:
app/services/issuable/import_csv/base_service.rb

Direct Known Subclasses

Issues::ImportCsvService

Instance Method Summary collapse

Constructor Details

#initialize(user, project, csv_io) ⇒ BaseService

Returns a new instance of BaseService.


6
7
8
9
10
11
# File 'app/services/issuable/import_csv/base_service.rb', line 6

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


13
14
15
16
17
18
# File 'app/services/issuable/import_csv/base_service.rb', line 13

def execute
  process_csv
  email_results_to_user

  @results
end