class RbVulnerabilityClassification

Attributes

name[RW]

Public Class Methods

new(link, name) click to toggle source
# File lib/ruby_burp/rb_vulnerability_classification.rb, line 4
def initialize(link, name)
  self.link = link
  self.name = name
end
parse(html) click to toggle source
# File lib/ruby_burp/rb_vulnerability_classification.rb, line 10
def parse(html)
  classifications = []

  html_doc = Nokogiri::HTML(html)
  html_doc.xpath('//ul/li').map do |link|
    classifications.push(RbVulnerabilityClassification.new(link.css('a').attribute('href').value, link.css('a').text))
  end
  
  classifications
end