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.
-
#partial_scan_mode ⇒ Object
Returns the value of attribute partial_scan_mode.
-
#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 16 |
# File 'lib/gitlab/ci/reports/security/scan.rb', line 10 def initialize(params = {}) @type = params['type'] @status = params['status'] @start_time = params['start_time'] @end_time = params['end_time'] @partial_scan_mode = params.dig('partial_scan', 'mode') 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 |
#partial_scan_mode ⇒ Object
Returns the value of attribute partial_scan_mode.
8 9 10 |
# File 'lib/gitlab/ci/reports/security/scan.rb', line 8 def partial_scan_mode @partial_scan_mode 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
18 19 20 21 22 23 24 25 |
# File 'lib/gitlab/ci/reports/security/scan.rb', line 18 def to_hash { type: type, status: status, start_time: start_time, end_time: end_time }.compact end |