Class: RaCvss
- Inherits:
-
Object
- Object
- RaCvss
- Defined in:
- lib/ruby_acunetix/ra_cvss.rb
Instance Attribute Summary collapse
-
#a ⇒ Object
Returns the value of attribute a.
-
#ac ⇒ Object
Returns the value of attribute ac.
-
#au ⇒ Object
Returns the value of attribute au.
-
#av ⇒ Object
Returns the value of attribute av.
-
#c ⇒ Object
Returns the value of attribute c.
-
#descriptor ⇒ Object
Returns the value of attribute descriptor.
-
#e ⇒ Object
Returns the value of attribute e.
-
#i ⇒ Object
Returns the value of attribute i.
-
#rc ⇒ Object
Returns the value of attribute rc.
-
#rl ⇒ Object
Returns the value of attribute rl.
-
#score ⇒ Object
Returns the value of attribute score.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(fields) ⇒ RaCvss
constructor
A new instance of RaCvss.
Constructor Details
#initialize(fields) ⇒ RaCvss
Returns a new instance of RaCvss.
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/ruby_acunetix/ra_cvss.rb', line 4 def initialize(fields) self.descriptor = fields[:descriptor] self.score = fields[:score] self.av = fields[:av] self.ac = fields[:ac] self.au = fields[:au] self.c = fields[:c] self.i = fields[:i] self.a = fields[:a] self.e = fields[:e] self.rl = fields[:rl] self.rc = fields[:rc] end |
Instance Attribute Details
#a ⇒ Object
Returns the value of attribute a.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss.rb', line 2 def a @a end |
#ac ⇒ Object
Returns the value of attribute ac.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss.rb', line 2 def ac @ac end |
#au ⇒ Object
Returns the value of attribute au.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss.rb', line 2 def au @au end |
#av ⇒ Object
Returns the value of attribute av.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss.rb', line 2 def av @av end |
#c ⇒ Object
Returns the value of attribute c.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss.rb', line 2 def c @c end |
#descriptor ⇒ Object
Returns the value of attribute descriptor.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss.rb', line 2 def descriptor @descriptor end |
#e ⇒ Object
Returns the value of attribute e.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss.rb', line 2 def e @e end |
#i ⇒ Object
Returns the value of attribute i.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss.rb', line 2 def i @i end |
#rc ⇒ Object
Returns the value of attribute rc.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss.rb', line 2 def rc @rc end |
#rl ⇒ Object
Returns the value of attribute rl.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss.rb', line 2 def rl @rl end |
#score ⇒ Object
Returns the value of attribute score.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss.rb', line 2 def score @score end |
Class Method Details
.parse(cvss) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/ruby_acunetix/ra_cvss.rb', line 19 def parse(cvss) fields = {} fields[:descriptor] = cvss.css(:Descriptor).text fields[:score] = cvss.css(:Score).text fields[:av] = cvss.css(:AV).text fields[:ac] = cvss.css(:AC).text fields[:au] = cvss.css(:Au).text fields[:c] = cvss.css(:C).text fields[:i] = cvss.css(:I).text fields[:a] = cvss.css(:A).text fields[:e] = cvss.css(:E).text fields[:rl] = cvss.css(:RL).text fields[:rc] = cvss.css(:RC).text RaCvss.new(fields) end |