Module: Pasqual::Arglist
- Defined in:
- lib/pasqual/arglist.rb
Class Method Summary collapse
Class Method Details
.args(username, password, host, port, name) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/pasqual/arglist.rb', line 5 def self.args(username, password, host, port, name) list = [] list << '-h' << host if host.to_s.length > 0 list << '-U' << username if username.to_s.length > 0 list << '-p' << port.to_s if port.to_s.length > 0 list << '-w' if password.to_s.length == 0 list + [name] end |