Module: Ukiryu::ExecutableLocator::SystemCommandDiscovery Private

Defined in:
lib/ukiryu/executable_locator.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

System command discovery (which/where/command -v)

Class Method Summary collapse

Class Method Details

.discover(command, context) ⇒ Hash?

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Discover executable via system commands

Parameters:

  • command (String)

    the command to locate

  • context (DiscoveryContext)

    discovery environment

Returns:

  • (Hash, nil)

    discovery result or nil



174
175
176
177
# File 'lib/ukiryu/executable_locator.rb', line 174

def discover(command, context)
  path = SystemCommandExecutor.find(command)
  DiscoveryResult.build(path, :path, context) if path
end