Method: Howzit::Util.valid_command?

Defined in:
lib/howzit/util.rb

.valid_command?(command) ⇒ Boolean

Test if an external command exists and is executable. Removes additional arguments and passes just the executable to #command_exist?



28
29
30
31
# File 'lib/howzit/util.rb', line 28

def valid_command?(command)
  cmd = command.split(' ')[0]
  command_exist?(cmd)
end