class SSHKit::IPv6HostWithPortParser

@private

Constants

IPV6_REGEX

Public Class Methods

suitable?(host_string) click to toggle source
# File lib/sshkit/host.rb, line 156
def self.suitable?(host_string)
  host_string.match(IPV6_REGEX)
end

Public Instance Methods

hostname() click to toggle source
# File lib/sshkit/host.rb, line 166
def hostname
  @host_string.match(IPV6_REGEX)[1]
end
port() click to toggle source
# File lib/sshkit/host.rb, line 160
def port
  prt = @host_string.match(IPV6_REGEX)[2]
  prt = prt.to_i unless prt.nil?
  prt
end