class SSHKit::HostWithUsernameAndPortParser

@private

Public Class Methods

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

Public Instance Methods

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