blob: d459c9a88fbd7b21a0a01be936bb9a2486617f0d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
module Gitlab
module GitalyClient
class Diff
FIELDS = %i(from_path to_path old_mode new_mode from_id to_id patch overflow_marker collapsed).freeze
attr_accessor(*FIELDS)
def initialize(params)
params.each do |key, val|
public_send(:"#{key}=", val)
end
end
def ==(other)
FIELDS.all? do |field|
public_send(field) == other.public_send(field)
end
end
end
end
end
|