Sha256: 46dc5265c590c34ccbee83995d9b20aefac82b6a8be8cfe082922cab9fe26cc8

Contents?: true

Size: 533 Bytes

Versions: 11

Compression:

Stored size: 533 Bytes

Contents

require 'yaml'

module SSHScan
  class Policy
    attr_reader :name, :kex, :macs, :encryption, :compression

    def initialize(opts = {})
      @name = opts['name'] || []
      @kex = opts['kex'] || []
      @macs = opts['macs'] || []
      @encryption = opts['encryption'] || []
      @compression = opts['compression'] || []
    end

    def self.from_file(file)
      opts = YAML.load_file(file)
      self.new(opts)
    end

    def self.from_string(string)
      opts = YAML.load(string)
      self.new(opts)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ssh_scan-0.0.10.beta.2 lib/ssh_scan/policy.rb
ssh_scan-0.0.10.beta.1 lib/ssh_scan/policy.rb
ssh_scan-0.0.9 lib/ssh_scan/policy.rb
ssh_scan-0.0.9.beta.3 lib/ssh_scan/policy.rb
ssh_scan-0.0.9.beta.2 lib/ssh_scan/policy.rb
ssh_scan-0.0.9.beta.1 lib/ssh_scan/policy.rb
ssh_scan-0.0.8 lib/ssh_scan/policy.rb
ssh_scan-0.0.7 lib/ssh_scan/policy.rb
ssh_scan-0.0.6 lib/ssh_scan/policy.rb
ssh_scan-0.0.4 lib/ssh_scan/policy.rb
ssh_scan-0.0.3 lib/ssh_scan/policy.rb