Class: Gitlab::Ci::Reports::Security::Locations::Base
- Inherits:
-
Object
- Object
- Gitlab::Ci::Reports::Security::Locations::Base
- Includes:
- Utils::StrongMemoize
- Defined in:
- lib/gitlab/ci/reports/security/locations/base.rb
Direct Known Subclasses
Instance Method Summary collapse
- #==(other) ⇒ Object
- #as_json(options = nil) ⇒ Object
- #fingerprint ⇒ Object
- #fingerprint_path ⇒ Object
Instance Method Details
#==(other) ⇒ Object
11 12 13 |
# File 'lib/gitlab/ci/reports/security/locations/base.rb', line 11 def ==(other) other.fingerprint == fingerprint end |
#as_json(options = nil) ⇒ Object
21 22 23 24 25 |
# File 'lib/gitlab/ci/reports/security/locations/base.rb', line 21 def as_json( = nil) fingerprint # side-effect call to initialize the ivar for serialization super end |
#fingerprint ⇒ Object
15 16 17 18 19 |
# File 'lib/gitlab/ci/reports/security/locations/base.rb', line 15 def fingerprint strong_memoize(:fingerprint) do Digest::SHA1.hexdigest(fingerprint_data) end end |
#fingerprint_path ⇒ Object
27 28 29 |
# File 'lib/gitlab/ci/reports/security/locations/base.rb', line 27 def fingerprint_path fingerprint_data end |