Class: Gemsurance::Vulnerability
- Inherits:
-
Object
- Object
- Gemsurance::Vulnerability
- Defined in:
- lib/gemsurance/vulnerability.rb
Constant Summary collapse
- ATTRIBUTES =
[:gem, :framework, :cve, :osvdb, :url, :title, :description, :date, :cvss_v2, :patched_versions, :unaffected_versions].freeze
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(yaml) ⇒ Vulnerability
constructor
A new instance of Vulnerability.
Constructor Details
#initialize(yaml) ⇒ Vulnerability
Returns a new instance of Vulnerability.
5 6 7 |
# File 'lib/gemsurance/vulnerability.rb', line 5 def initialize(yaml) @attributes = YAML.load(yaml) end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
9 10 11 |
# File 'lib/gemsurance/vulnerability.rb', line 9 def attributes @attributes end |
Instance Method Details
#==(other) ⇒ Object
19 20 21 |
# File 'lib/gemsurance/vulnerability.rb', line 19 def ==(other) @attributes == other.attributes end |