Class: Gitlab::Ci::Reports::Security::Link

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/ci/reports/security/link.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject

Returns the value of attribute name.


8
9
10
# File 'lib/gitlab/ci/reports/security/link.rb', line 8

def name
  @name
end

#urlObject

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

#to_hashObject


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