Class: Gitlab::Ci::Reports::Security::Link
- Inherits:
-
Object
- Object
- Gitlab::Ci::Reports::Security::Link
- Defined in:
- lib/gitlab/ci/reports/security/link.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name: nil, url: nil) ⇒ Link
constructor
A new instance of Link.
- #to_hash ⇒ Object
Constructor Details
#initialize(name: nil, url: nil) ⇒ Link
Returns a new instance of Link.
10 11 12 13 |
# File 'lib/gitlab/ci/reports/security/link.rb', line 10 def initialize(name: nil, url: nil) @name = name @url = url end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/gitlab/ci/reports/security/link.rb', line 8 def name @name end |
#url ⇒ Object
Returns the value of attribute url.
8 9 10 |
# File 'lib/gitlab/ci/reports/security/link.rb', line 8 def url @url end |
Instance Method Details
#==(other) ⇒ Object
22 23 24 |
# File 'lib/gitlab/ci/reports/security/link.rb', line 22 def ==(other) name == other.name && url == other.url end |
#to_hash ⇒ Object
15 16 17 18 19 20 |
# File 'lib/gitlab/ci/reports/security/link.rb', line 15 def to_hash { name: name, url: url }.compact end |