Class: ProjectReportDetail
- Inherits:
-
Domain::Model
- Object
- Domain::Model
- ProjectReportDetail
- Defined in:
- lib/domain/project/model.rb
Instance Attribute Summary collapse
-
#age ⇒ Object
Returns the value of attribute age.
-
#asset_name ⇒ Object
Returns the value of attribute asset_name.
-
#asset_owner ⇒ Object
Returns the value of attribute asset_owner.
-
#cve_or_cwe ⇒ Object
Returns the value of attribute cve_or_cwe.
-
#cvss_score ⇒ Object
Returns the value of attribute cvss_score.
-
#cvss_temporal ⇒ Object
Returns the value of attribute cvss_temporal.
-
#description ⇒ Object
Returns the value of attribute description.
-
#due_date ⇒ Object
Returns the value of attribute due_date.
-
#exploit_available ⇒ Object
Returns the value of attribute exploit_available.
-
#finding_discovered ⇒ Object
Returns the value of attribute finding_discovered.
-
#iava ⇒ Object
Returns the value of attribute iava.
-
#impact ⇒ Object
Returns the value of attribute impact.
-
#ip ⇒ Object
Returns the value of attribute ip.
-
#last_seen ⇒ Object
Returns the value of attribute last_seen.
-
#mitigated ⇒ Object
Returns the value of attribute mitigated.
-
#name ⇒ Object
Returns the value of attribute name.
-
#operating_system ⇒ Object
Returns the value of attribute operating_system.
-
#owasp ⇒ Object
Returns the value of attribute owasp.
-
#parameter ⇒ Object
Returns the value of attribute parameter.
-
#path ⇒ Object
Returns the value of attribute path.
-
#payload ⇒ Object
Returns the value of attribute payload.
-
#payload2 ⇒ Object
Returns the value of attribute payload2.
-
#payload3 ⇒ Object
Returns the value of attribute payload3.
-
#payload4 ⇒ Object
Returns the value of attribute payload4.
-
#payload5 ⇒ Object
Returns the value of attribute payload5.
-
#plugin_number ⇒ Object
Returns the value of attribute plugin_number.
-
#port ⇒ Object
Returns the value of attribute port.
-
#refs ⇒ Object
Returns the value of attribute refs.
-
#report_id ⇒ Object
Returns the value of attribute report_id.
-
#request_method ⇒ Object
Returns the value of attribute request_method.
-
#row_id ⇒ Object
Returns the value of attribute row_id.
-
#scan_type ⇒ Object
Returns the value of attribute scan_type.
-
#service ⇒ Object
Returns the value of attribute service.
-
#severity ⇒ Object
Returns the value of attribute severity.
-
#solution ⇒ Object
Returns the value of attribute solution.
-
#status ⇒ Object
Returns the value of attribute status.
-
#user_comments ⇒ Object
Returns the value of attribute user_comments.
-
#wasc ⇒ Object
Returns the value of attribute wasc.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ ProjectReportDetail
constructor
A new instance of ProjectReportDetail.
- #table_name ⇒ Object
Methods inherited from Domain::Model
columns, from_csv, from_json, headers, table_name, #to_csv, #to_hash, #to_s, view
Constructor Details
#initialize(attributes = {}) ⇒ ProjectReportDetail
Returns a new instance of ProjectReportDetail.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/domain/project/model.rb', line 104 def initialize(attributes = {}) remapped_attributes = attributes.transform_keys do |key| case key when 'Scan Type' then 'scan_type' when 'Asset Name' then 'asset_name' when 'Asset Owner' then 'asset_owner' when 'IP' then 'ip' when 'Last Seen' then 'last_seen' when 'Operating System' then 'operating_system' when 'Finding Discovered' then 'finding_discovered' when 'Age' then 'age' when 'Plugin Number' then 'plugin_number' when 'Name' then 'name' when 'Description' then 'description' when 'Severity' then 'severity' when 'Exploit Available' then 'exploit_available' when 'Status' then 'status' when 'Request Method' then 'request_method' when 'Parameter' then 'parameter' when 'Service' then 'service' when 'Port' then 'port' when 'Path' then 'path' when 'Due Date' then 'due_date' when 'IAVA' then 'iava' when 'CVE/CWE' then 'cve_or_cwe' when 'CVSS Score' then 'cvss_score' when 'CVSS Temporal' then 'cvss_temporal' when 'References' then 'refs' when 'Impact' then 'impact' when 'Solution' then 'solution' when 'Mitigated' then 'mitigated' when 'User Comments' then 'user_comments' when 'OWASP' then 'owasp' when 'WASC' then 'wasc' when 'Payload' then 'payload' when 'Payload2' then 'payload2' when 'Payload3' then 'payload3' when 'Payload4' then 'payload4' when 'Payload5' then 'payload5' else key # For all other keys that do not need remapping end end super(remapped_attributes) # Call the superclass's initialize method end |
Instance Attribute Details
#age ⇒ Object
Returns the value of attribute age.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def age @age end |
#asset_name ⇒ Object
Returns the value of attribute asset_name.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def asset_name @asset_name end |
#asset_owner ⇒ Object
Returns the value of attribute asset_owner.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def asset_owner @asset_owner end |
#cve_or_cwe ⇒ Object
Returns the value of attribute cve_or_cwe.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def cve_or_cwe @cve_or_cwe end |
#cvss_score ⇒ Object
Returns the value of attribute cvss_score.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def cvss_score @cvss_score end |
#cvss_temporal ⇒ Object
Returns the value of attribute cvss_temporal.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def cvss_temporal @cvss_temporal end |
#description ⇒ Object
Returns the value of attribute description.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def description @description end |
#due_date ⇒ Object
Returns the value of attribute due_date.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def due_date @due_date end |
#exploit_available ⇒ Object
Returns the value of attribute exploit_available.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def exploit_available @exploit_available end |
#finding_discovered ⇒ Object
Returns the value of attribute finding_discovered.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def finding_discovered @finding_discovered end |
#iava ⇒ Object
Returns the value of attribute iava.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def iava @iava end |
#impact ⇒ Object
Returns the value of attribute impact.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def impact @impact end |
#ip ⇒ Object
Returns the value of attribute ip.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def ip @ip end |
#last_seen ⇒ Object
Returns the value of attribute last_seen.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def last_seen @last_seen end |
#mitigated ⇒ Object
Returns the value of attribute mitigated.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def mitigated @mitigated end |
#name ⇒ Object
Returns the value of attribute name.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def name @name end |
#operating_system ⇒ Object
Returns the value of attribute operating_system.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def @operating_system end |
#owasp ⇒ Object
Returns the value of attribute owasp.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def owasp @owasp end |
#parameter ⇒ Object
Returns the value of attribute parameter.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def parameter @parameter end |
#path ⇒ Object
Returns the value of attribute path.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def path @path end |
#payload ⇒ Object
Returns the value of attribute payload.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def payload @payload end |
#payload2 ⇒ Object
Returns the value of attribute payload2.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def payload2 @payload2 end |
#payload3 ⇒ Object
Returns the value of attribute payload3.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def payload3 @payload3 end |
#payload4 ⇒ Object
Returns the value of attribute payload4.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def payload4 @payload4 end |
#payload5 ⇒ Object
Returns the value of attribute payload5.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def payload5 @payload5 end |
#plugin_number ⇒ Object
Returns the value of attribute plugin_number.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def plugin_number @plugin_number end |
#port ⇒ Object
Returns the value of attribute port.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def port @port end |
#refs ⇒ Object
Returns the value of attribute refs.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def refs @refs end |
#report_id ⇒ Object
Returns the value of attribute report_id.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def report_id @report_id end |
#request_method ⇒ Object
Returns the value of attribute request_method.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def request_method @request_method end |
#row_id ⇒ Object
Returns the value of attribute row_id.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def row_id @row_id end |
#scan_type ⇒ Object
Returns the value of attribute scan_type.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def scan_type @scan_type end |
#service ⇒ Object
Returns the value of attribute service.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def service @service end |
#severity ⇒ Object
Returns the value of attribute severity.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def severity @severity end |
#solution ⇒ Object
Returns the value of attribute solution.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def solution @solution end |
#status ⇒ Object
Returns the value of attribute status.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def status @status end |
#user_comments ⇒ Object
Returns the value of attribute user_comments.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def user_comments @user_comments end |
#wasc ⇒ Object
Returns the value of attribute wasc.
58 59 60 |
# File 'lib/domain/project/model.rb', line 58 def wasc @wasc end |
Class Method Details
.primary_key ⇒ Object
100 101 102 |
# File 'lib/domain/project/model.rb', line 100 def self.primary_key %w[report_id row_id] end |
Instance Method Details
#table_name ⇒ Object
96 97 98 |
# File 'lib/domain/project/model.rb', line 96 def table_name 'project_report_detail' end |