Sha256: 27852150b44e03336cd31c538a1ce0020ab9501adfb6cd886dac7431f8508a28
Contents?: true
Size: 575 Bytes
Versions: 20
Compression:
Stored size: 575 Bytes
Contents
require 'yaml' module SSHScan # A helper to turn array of strings into arrays of attributes for quick comparison def self.make_attributes(array) array.map {|item| SSHScan::Attribute.new(item)} end # A class for making attribute comparison possible beyond simple string comparison class Attribute def initialize(attribute_string) @attribute_string = attribute_string end def to_s @attribute_string end def base @attribute_string.split("@").first end def ==(other) self.base == other.base end end end
Version data entries
20 entries across 20 versions & 1 rubygems