Class: GemGuard::Vulnerability
- Inherits:
-
Object
- Object
- GemGuard::Vulnerability
- Defined in:
- lib/gem_guard/vulnerability_fetcher.rb
Instance Attribute Summary collapse
-
#affected_versions ⇒ Object
readonly
Returns the value of attribute affected_versions.
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#fixed_versions ⇒ Object
readonly
Returns the value of attribute fixed_versions.
-
#gem_name ⇒ Object
readonly
Returns the value of attribute gem_name.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#severity ⇒ Object
readonly
Returns the value of attribute severity.
-
#summary ⇒ Object
readonly
Returns the value of attribute summary.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(id:, gem_name:, affected_versions: [], fixed_versions: [], severity: "UNKNOWN", summary: "", details: "") ⇒ Vulnerability
constructor
A new instance of Vulnerability.
Constructor Details
#initialize(id:, gem_name:, affected_versions: [], fixed_versions: [], severity: "UNKNOWN", summary: "", details: "") ⇒ Vulnerability
Returns a new instance of Vulnerability.
244 245 246 247 248 249 250 251 252 |
# File 'lib/gem_guard/vulnerability_fetcher.rb', line 244 def initialize(id:, gem_name:, affected_versions: [], fixed_versions: [], severity: "UNKNOWN", summary: "", details: "") @id = id @gem_name = gem_name @affected_versions = affected_versions @fixed_versions = fixed_versions @severity = severity @summary = summary @details = details end |
Instance Attribute Details
#affected_versions ⇒ Object (readonly)
Returns the value of attribute affected_versions.
242 243 244 |
# File 'lib/gem_guard/vulnerability_fetcher.rb', line 242 def affected_versions @affected_versions end |
#details ⇒ Object (readonly)
Returns the value of attribute details.
242 243 244 |
# File 'lib/gem_guard/vulnerability_fetcher.rb', line 242 def details @details end |
#fixed_versions ⇒ Object (readonly)
Returns the value of attribute fixed_versions.
242 243 244 |
# File 'lib/gem_guard/vulnerability_fetcher.rb', line 242 def fixed_versions @fixed_versions end |
#gem_name ⇒ Object (readonly)
Returns the value of attribute gem_name.
242 243 244 |
# File 'lib/gem_guard/vulnerability_fetcher.rb', line 242 def gem_name @gem_name end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
242 243 244 |
# File 'lib/gem_guard/vulnerability_fetcher.rb', line 242 def id @id end |
#severity ⇒ Object (readonly)
Returns the value of attribute severity.
242 243 244 |
# File 'lib/gem_guard/vulnerability_fetcher.rb', line 242 def severity @severity end |
#summary ⇒ Object (readonly)
Returns the value of attribute summary.
242 243 244 |
# File 'lib/gem_guard/vulnerability_fetcher.rb', line 242 def summary @summary end |
Instance Method Details
#==(other) ⇒ Object
254 255 256 |
# File 'lib/gem_guard/vulnerability_fetcher.rb', line 254 def ==(other) other.is_a?(Vulnerability) && id == other.id end |