class SSHKit::HostWithUsernameAndPortParser
@private
Public Class Methods
suitable?(host_string)
click to toggle source
# File lib/sshkit/host.rb, line 146 def self.suitable?(host_string) host_string.match(/@.*:\d+/) end
Public Instance Methods
hostname()
click to toggle source
# File lib/sshkit/host.rb, line 152 def hostname @host_string.split(/:|@/)[1] end
port()
click to toggle source
# File lib/sshkit/host.rb, line 155 def port @host_string.split(/:|@/)[2].to_i end
username()
click to toggle source
# File lib/sshkit/host.rb, line 149 def username @host_string.split(/:|@/)[0] end