Module: WebConsole::Dependencies::Tester
- Defined in:
- lib/webconsole/dependencies/lib/tester.rb
Class Method Summary collapse
Class Method Details
.check(name, type) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/webconsole/dependencies/lib/tester.rb', line 3 def self.check(name, type) case type when :shell_command return check_shell_command(name) end end |
.check_shell_command(name) ⇒ Object
13 14 15 16 |
# File 'lib/webconsole/dependencies/lib/tester.rb', line 13 def self.check_shell_command(name) command = "type -a #{Shellwords.escape(name)} > /dev/null 2>&1" return system(command) end |