Class: RaCvss3
- Inherits:
-
Object
- Object
- RaCvss3
- Defined in:
- lib/ruby_acunetix/ra_cvss3.rb
Instance Attribute Summary collapse
-
#a ⇒ Object
Returns the value of attribute a.
-
#ac ⇒ Object
Returns the value of attribute ac.
-
#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.
-
#env_score ⇒ Object
Returns the value of attribute env_score.
-
#i ⇒ Object
Returns the value of attribute i.
-
#pr ⇒ Object
Returns the value of attribute pr.
-
#rc ⇒ Object
Returns the value of attribute rc.
-
#rl ⇒ Object
Returns the value of attribute rl.
-
#s ⇒ Object
Returns the value of attribute s.
-
#score ⇒ Object
Returns the value of attribute score.
-
#temp_score ⇒ Object
Returns the value of attribute temp_score.
-
#ui ⇒ Object
Returns the value of attribute ui.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(fields) ⇒ RaCvss3
constructor
A new instance of RaCvss3.
Constructor Details
#initialize(fields) ⇒ RaCvss3
Returns a new instance of RaCvss3.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/ruby_acunetix/ra_cvss3.rb', line 4 def initialize(fields) self.descriptor = fields[:descriptor] self.score = fields[:score] self.temp_score = fields[:temp_score] self.env_score = fields[:env_score] self.av = fields[:av] self.ac = fields[:ac] self.pr = fields[:pr] self.ui = fields[:ui] self.s = fields[:s] 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_cvss3.rb', line 2 def a @a end |
#ac ⇒ Object
Returns the value of attribute ac.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss3.rb', line 2 def ac @ac end |
#av ⇒ Object
Returns the value of attribute av.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss3.rb', line 2 def av @av end |
#c ⇒ Object
Returns the value of attribute c.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss3.rb', line 2 def c @c end |
#descriptor ⇒ Object
Returns the value of attribute descriptor.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss3.rb', line 2 def descriptor @descriptor end |
#e ⇒ Object
Returns the value of attribute e.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss3.rb', line 2 def e @e end |
#env_score ⇒ Object
Returns the value of attribute env_score.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss3.rb', line 2 def env_score @env_score end |
#i ⇒ Object
Returns the value of attribute i.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss3.rb', line 2 def i @i end |
#pr ⇒ Object
Returns the value of attribute pr.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss3.rb', line 2 def pr @pr end |
#rc ⇒ Object
Returns the value of attribute rc.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss3.rb', line 2 def rc @rc end |
#rl ⇒ Object
Returns the value of attribute rl.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss3.rb', line 2 def rl @rl end |
#s ⇒ Object
Returns the value of attribute s.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss3.rb', line 2 def s @s end |
#score ⇒ Object
Returns the value of attribute score.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss3.rb', line 2 def score @score end |
#temp_score ⇒ Object
Returns the value of attribute temp_score.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss3.rb', line 2 def temp_score @temp_score end |
#ui ⇒ Object
Returns the value of attribute ui.
2 3 4 |
# File 'lib/ruby_acunetix/ra_cvss3.rb', line 2 def ui @ui end |
Class Method Details
.parse(cvss3) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/ruby_acunetix/ra_cvss3.rb', line 23 def parse(cvss3) fields = {} fields[:descriptor] = cvss3.css(:Descriptor).text fields[:score] = cvss3.css(:Score).text fields[:temp_score] = cvss3.css(:TempScore).text fields[:env_score] = cvss3.css(:EnvScore).text fields[:av] = cvss3.css(:AV).text fields[:ac] = cvss3.css(:AC).text fields[:pr] = cvss3.css(:PR).text fields[:ui] = cvss3.css(:UI).text fields[:s] = cvss3.css(:S).text fields[:c] = cvss3.css(:C).text fields[:i] = cvss3.css(:I).text fields[:a] = cvss3.css(:A).text fields[:e] = cvss3.css(:E).text fields[:rl] = cvss3.css(:RL).text fields[:rc] = cvss3.css(:RC).text RaCvss3.new(fields) end |