class SSHKit::HostWithPortParser
Public Class Methods
suitable?(host_string)
click to toggle source
# File lib/sshkit/host.rb, line 120 def self.suitable?(host_string) !host_string.match(/@|\[|\]/) end
Public Instance Methods
hostname()
click to toggle source
# File lib/sshkit/host.rb, line 128 def hostname @host_string.split(':').first end
port()
click to toggle source
# File lib/sshkit/host.rb, line 124 def port @host_string.split(':').last.to_i end