Class: Protobox::Util::System
- Inherits:
-
Object
- Object
- Protobox::Util::System
- Defined in:
- lib/protobox/util.rb
Constant Summary collapse
- PWD =
Dir.pwd
Class Method Summary collapse
Class Method Details
.command_to_string(cmd) ⇒ Object
88 89 90 91 |
# File 'lib/protobox/util.rb', line 88 def command_to_string(cmd) full_cmd = to_exec(cmd) full_cmd.respond_to?(:shelljoin) ? full_cmd.shelljoin : full_cmd.join(' ') end |
.current_dir ⇒ Object
79 80 81 |
# File 'lib/protobox/util.rb', line 79 def current_dir PWD end |
.to_exec(args) ⇒ Object
83 84 85 86 |
# File 'lib/protobox/util.rb', line 83 def to_exec(args) args = Shellwords.shellwords(args) if args.respond_to? :to_str Array(executable) + Array(args) end |