Class: SSHScan::Attribute
- Inherits:
-
Object
- Object
- SSHScan::Attribute
- Defined in:
- lib/ssh_scan/attribute.rb
Overview
A class for making attribute comparison possible beyond simple string comparison
Instance Method Summary collapse
- #==(other) ⇒ Object
- #base ⇒ Object
-
#initialize(attribute_string) ⇒ Attribute
constructor
A new instance of Attribute.
- #to_s ⇒ Object
Constructor Details
#initialize(attribute_string) ⇒ Attribute
Returns a new instance of Attribute.
11 12 13 |
# File 'lib/ssh_scan/attribute.rb', line 11 def initialize(attribute_string) @attribute_string = attribute_string end |
Instance Method Details
#==(other) ⇒ Object
23 24 25 |
# File 'lib/ssh_scan/attribute.rb', line 23 def ==(other) self.base == other.base end |
#base ⇒ Object
19 20 21 |
# File 'lib/ssh_scan/attribute.rb', line 19 def base @attribute_string.split("@").first end |
#to_s ⇒ Object
15 16 17 |
# File 'lib/ssh_scan/attribute.rb', line 15 def to_s @attribute_string end |