Module: DiffFile

Extended by:
ActiveSupport::Concern
Included in:
MergeRequestContextCommitDiffFile, MergeRequestDiffFile, NoteDiffFile
Defined in:
app/models/concerns/diff_file.rb

Instance Method Summary collapse

Instance Method Details

#to_hashObject



6
7
8
9
10
# File 'app/models/concerns/diff_file.rb', line 6

def to_hash
  keys = Gitlab::Git::Diff::SERIALIZE_KEYS - [:diff]

  as_json(only: keys).merge(diff: diff).with_indifferent_access
end