Class: Gitlab::Ci::Reports::Security::Scan
- Inherits:
-
Object
- Object
- Gitlab::Ci::Reports::Security::Scan
- Defined in:
- lib/gitlab/ci/reports/security/scan.rb
Instance Attribute Summary collapse
-
#end_time ⇒ Object
Returns the value of attribute end_time.
-
#start_time ⇒ Object
Returns the value of attribute start_time.
-
#status ⇒ Object
Returns the value of attribute status.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Scan
constructor
A new instance of Scan.
- #to_hash ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ Scan
Returns a new instance of Scan.
10 11 12 13 14 15 |
# File 'lib/gitlab/ci/reports/security/scan.rb', line 10 def initialize(params = {}) @type = params.dig('type') @status = params.dig('status') @start_time = params.dig('start_time') @end_time = params.dig('end_time') end |
Instance Attribute Details
#end_time ⇒ Object
Returns the value of attribute end_time.
8 9 10 |
# File 'lib/gitlab/ci/reports/security/scan.rb', line 8 def end_time @end_time end |
#start_time ⇒ Object
Returns the value of attribute start_time.
8 9 10 |
# File 'lib/gitlab/ci/reports/security/scan.rb', line 8 def start_time @start_time end |
#status ⇒ Object
Returns the value of attribute status.
8 9 10 |
# File 'lib/gitlab/ci/reports/security/scan.rb', line 8 def status @status end |
#type ⇒ Object
Returns the value of attribute type.
8 9 10 |
# File 'lib/gitlab/ci/reports/security/scan.rb', line 8 def type @type end |
Instance Method Details
#to_hash ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/gitlab/ci/reports/security/scan.rb', line 17 def to_hash { type: type, status: status, start_time: start_time, end_time: end_time }.compact end |