class SSHKit::HostWithUsernameAndPortParser

@private

Public Class Methods

suitable?(host_string) click to toggle source
# File lib/sshkit/host.rb, line 137
def self.suitable?(host_string)
  host_string.match(/@.*:\d+/)
end

Public Instance Methods

hostname() click to toggle source
# File lib/sshkit/host.rb, line 143
def hostname
  @host_string.split(/:|@/)[1]
end
port() click to toggle source
# File lib/sshkit/host.rb, line 146
def port
  @host_string.split(/:|@/)[2].to_i
end
username() click to toggle source
# File lib/sshkit/host.rb, line 140
def username
  @host_string.split(/:|@/)[0]
end