Module: Dk::HasSSHOpts::InstanceMethods
- Defined in:
- lib/dk/has_ssh_opts.rb
Instance Method Summary collapse
- #host_ssh_args(host_name = nil, value = nil) ⇒ Object
- #ssh_args(value = nil) ⇒ Object
- #ssh_hosts(group_name = nil, *values) ⇒ Object
Instance Method Details
#host_ssh_args(host_name = nil, value = nil) ⇒ Object
26 27 28 29 30 |
# File 'lib/dk/has_ssh_opts.rb', line 26 def host_ssh_args(host_name = nil, value = nil) return @host_ssh_args if host_name.nil? @host_ssh_args[host_name.to_s] = value if !value.nil? @host_ssh_args[host_name.to_s] end |
#ssh_args(value = nil) ⇒ Object
21 22 23 24 |
# File 'lib/dk/has_ssh_opts.rb', line 21 def ssh_args(value = nil) @ssh_args = value if !value.nil? @ssh_args end |
#ssh_hosts(group_name = nil, *values) ⇒ Object
15 16 17 18 19 |
# File 'lib/dk/has_ssh_opts.rb', line 15 def ssh_hosts(group_name = nil, *values) return @ssh_hosts if group_name.nil? @ssh_hosts[group_name.to_s] = values.flatten if !values.empty? @ssh_hosts[group_name.to_s] end |