diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-07-06 19:28:13 -0400 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-07-06 19:28:13 -0400 |
commit | 228d2a4cb1943c4eda751f80990eed06a3875864 (patch) | |
tree | 402ec01514399a54f51688474ee855c1a30c6782 /lib/gitlab/diff/position.rb | |
parent | d9c75aec3adf23428e4c85a21ce2c357da006b6c (diff) | |
download | gitlab-ce-228d2a4cb1943c4eda751f80990eed06a3875864.tar.gz |
Add some more code comments.
Diffstat (limited to 'lib/gitlab/diff/position.rb')
-rw-r--r-- | lib/gitlab/diff/position.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/gitlab/diff/position.rb b/lib/gitlab/diff/position.rb index 4eff71859c3..989fff8918e 100644 --- a/lib/gitlab/diff/position.rb +++ b/lib/gitlab/diff/position.rb @@ -28,6 +28,11 @@ module Gitlab end end + # `Gitlab::Diff::Position` objects are stored as serialized attributes in + # `DiffNote`, which use YAML to encode and decode objects. + # `#init_with` and `#encode_with` can be used to customize the en/decoding + # behavior. In this case, we override these to prevent memoized instance + # variables like `@diff_file` and `@diff_line` from being serialized. def init_with(coder) initialize(coder['attributes']) |