class Bifrossht::Connection::Base
Attributes
config[RW]
Public Class Methods
new(config)
click to toggle source
# File lib/bifrossht/connection/base.rb, line 6 def initialize(config) @config = config end
Public Instance Methods
connect(_target)
click to toggle source
# File lib/bifrossht/connection/base.rb, line 18 def connect(_target) raise 'not implemented' end
match(target)
click to toggle source
# File lib/bifrossht/connection/base.rb, line 26 def match(target) host_matches = config.match.select do |re| re.match(target.host) end return true if host_matches.any? if target.resolvable? addr_matches = config.match_addr.select do |net| net.include?(target.resolved_ip) end return true if addr_matches.any? end false end
name()
click to toggle source
# File lib/bifrossht/connection/base.rb, line 10 def name config.name end
probe(_target)
click to toggle source
# File lib/bifrossht/connection/base.rb, line 14 def probe(_target) raise 'not implemented' end
skip_probe()
click to toggle source
# File lib/bifrossht/connection/base.rb, line 22 def skip_probe config.skip_probe end