Class: URI::Ssh::Generic
- Inherits:
-
Generic
- Object
- Generic
- URI::Ssh::Generic
- Defined in:
- lib/dr/base/uri.rb
Instance Method Summary collapse
-
#check_host(_v) ⇒ Object
check_host returns
false
for 'foo_bar' but in ssh config this can be a valid host. -
#to_ssh(show_path: true) ⇒ String
Git repository url via ssh protocol.
Instance Method Details
#check_host(_v) ⇒ Object
check_host returns false
for 'foo_bar'
but in ssh config this can be a valid host
58 59 60 |
# File 'lib/dr/base/uri.rb', line 58 def check_host(_v) return true end |
#to_ssh(show_path: true) ⇒ String
Returns git repository url via ssh protocol.
70 71 72 73 74 75 76 |
# File 'lib/dr/base/uri.rb', line 70 def to_ssh(show_path: true) str = '' str << "#{user}@" if user && !user.empty? str << "#{host}" str << ":#{path}" if path and show_path str end |