Class: RaCve
- Inherits:
-
Object
- Object
- RaCve
- Defined in:
- lib/ruby_acunetix/ra_cve.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#text ⇒ Object
Returns the value of attribute text.
-
#year ⇒ Object
Returns the value of attribute year.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id, year, text) ⇒ RaCve
constructor
A new instance of RaCve.
Constructor Details
#initialize(id, year, text) ⇒ RaCve
Returns a new instance of RaCve.
4 5 6 7 8 |
# File 'lib/ruby_acunetix/ra_cve.rb', line 4 def initialize(id, year, text) self.id = id self.year = year self.text = text end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cve.rb', line 2 def id @id end |
#text ⇒ Object
Returns the value of attribute text.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cve.rb', line 2 def text @text end |
#year ⇒ Object
Returns the value of attribute year.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cve.rb', line 2 def year @year end |
Class Method Details
.parse(cve) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/ruby_acunetix/ra_cve.rb', line 11 def parse(cve) return nil if cve.css('CVE').nil? || cve.css('CVE').text.strip == '' id = cve.css('CVE').attribute('id').value year = cve.css('CVE').attribute('year').value text = cve.css('CVE').text RaCve.new(id, year, text) end |