Class: NoteDiffFile

Inherits:
ApplicationRecord show all
Includes:
DiffFile
Defined in:
app/models/note_diff_file.rb

Instance Method Summary collapse

Methods included from DiffFile

#to_hash

Methods inherited from ApplicationRecord

at_most, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, underscore, without_order

Instance Method Details

#raw_diff_fileObject


16
17
18
19
20
21
22
23
# File 'app/models/note_diff_file.rb', line 16

def raw_diff_file
  raw_diff = Gitlab::Git::Diff.new(to_hash)

  Gitlab::Diff::File.new(raw_diff,
                         repository: project.repository,
                         diff_refs: original_position.diff_refs,
                         unique_identifier: id)
end