Class: Gitlab::LegacyGithubImport::CommentFormatter

Inherits:
BaseFormatter
  • Object
show all
Defined in:
lib/gitlab/legacy_github_import/comment_formatter.rb

Instance Attribute Summary collapse

Attributes inherited from BaseFormatter

#client, #formatter, #project, #raw_data

Instance Method Summary collapse

Methods inherited from BaseFormatter

#create!, #initialize, #url

Constructor Details

This class inherits a constructor from Gitlab::LegacyGithubImport::BaseFormatter

Instance Attribute Details

#author_id=(value) ⇒ Object

Sets the attribute author_id

Parameters:

  • value

    the value to set the attribute author_id to.



6
7
8
# File 'lib/gitlab/legacy_github_import/comment_formatter.rb', line 6

def author_id=(value)
  @author_id = value
end

Instance Method Details

#attributesObject



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/gitlab/legacy_github_import/comment_formatter.rb', line 8

def attributes
  {
    project: project,
    note: note,
    commit_id: raw_data[:commit_id],
    line_code: line_code,
    author_id: author_id,
    type: type,
    created_at: raw_data[:created_at],
    updated_at: raw_data[:updated_at]
  }
end