Class: AutomateIt::ShellManager::WhichWindows

Inherits:
WhichBase show all
Defined in:
lib/automateit/shell_manager/which_windows.rb

Overview

ShellManager::WhichWindows

A ShellManager driver providing access to which command by faking it on Windows systems.

Constant Summary collapse

WHICH_HELPER =
File.join(::AutomateIt::Constants::HELPERS_DIR, "which.cmd")

Constants inherited from Plugin::Driver

Plugin::Driver::BASE_DRIVER_NAME

Constants included from Constants

Constants::HELPERS_DIR, Constants::INSTALL_DIR, Constants::PERROR, Constants::PEXEC, Constants::PNOTE, Constants::WARNING_BOILERPLATE

Instance Attribute Summary

Attributes inherited from Plugin::Driver

#manager

Attributes inherited from Common

#interpreter

Instance Method Summary collapse

Methods inherited from WhichBase

#suitability, #which!

Methods inherited from BaseDriver

#peer_for

Methods inherited from Plugin::Driver

abstract_driver, #available?, base_driver, base_driver?, depends_on, inherited, manager_token, #setup, #suitability

Methods inherited from Plugin::Base

#setup, #token, token

Methods inherited from Common

#initialize, #log, #nitpick, #noop, #noop=, #noop?, #preview, #preview=, #preview?, #preview_for, #setup, #superuser?, #writing, #writing=, #writing?

Constructor Details

This class inherits a constructor from AutomateIt::Common

Instance Method Details

#which(command) ⇒ Object

See ShellManager#which



14
15
16
17
18
# File 'lib/automateit/shell_manager/which_windows.rb', line 14

def which(command)
  _which_helper do
    data = `#{WHICH_HELPER} #{command} 2>&1`
  end
end