class SSHKit::IPv6HostWithPortParser

@private

Public Class Methods

suitable?(host_string) click to toggle source
# File lib/sshkit/host.rb, line 166
def self.suitable?(host_string)
  host_string.match(/[a-fA-F0-9:]+:\d+/)
end

Public Instance Methods

hostname() click to toggle source
# File lib/sshkit/host.rb, line 174
def hostname
  @host_string.gsub!(/\[|\]/, '')
  @host_string.split(':')[0..-2].join(':')
end
port() click to toggle source
# File lib/sshkit/host.rb, line 170
def port
  @host_string.split(':').last.to_i
end