Class: RarCheck
- Inherits:
-
Object
- Object
- RarCheck
- Defined in:
- lib/ruby_arachni/rar_check.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#description ⇒ Object
Returns the value of attribute description.
-
#name ⇒ Object
Returns the value of attribute name.
-
#shortname ⇒ Object
Returns the value of attribute shortname.
-
#version ⇒ Object
Returns the value of attribute version.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(fields) ⇒ RarCheck
constructor
A new instance of RarCheck.
Constructor Details
#initialize(fields) ⇒ RarCheck
Returns a new instance of RarCheck.
4 5 6 7 8 9 10 |
# File 'lib/ruby_arachni/rar_check.rb', line 4 def initialize(fields) self.name = fields['name'] self.description = fields['description'] self. = fields['author'] self.version = fields['version'] self.shortname = fields['shortname'] end |
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
2 3 4 |
# File 'lib/ruby_arachni/rar_check.rb', line 2 def end |
#description ⇒ Object
Returns the value of attribute description.
2 3 4 |
# File 'lib/ruby_arachni/rar_check.rb', line 2 def description @description end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/ruby_arachni/rar_check.rb', line 2 def name @name end |
#shortname ⇒ Object
Returns the value of attribute shortname.
2 3 4 |
# File 'lib/ruby_arachni/rar_check.rb', line 2 def shortname @shortname end |
#version ⇒ Object
Returns the value of attribute version.
2 3 4 |
# File 'lib/ruby_arachni/rar_check.rb', line 2 def version @version end |
Class Method Details
.parse(check) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/ruby_arachni/rar_check.rb', line 13 def parse(check) fields = {} fields['name'] = check.css('name').text fields['description'] = check.css('description').text fields['author'] = check.css('author').text fields['version'] = check.css('version').text fields['shortname'] = check.css('shortname').text RarCheck.new(fields) end |