Module: Ukiryu::ExecutableLocator::DiscoveryResult 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.

Build discovery results (DRY helper)

Class Method Summary collapse

Class Method Details

.build(path, source, context, alias_definition = nil) ⇒ 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.

Build a discovery result hash

Parameters:

  • path (String)

    the executable path

  • source (Symbol)

    :path or :alias

  • context (DiscoveryContext)

    discovery environment

  • alias_definition (String, nil) (defaults to: nil)

    optional alias definition

Returns:

  • (Hash)

    “…”, info: ExecutableInfo



210
211
212
213
214
215
216
217
218
219
220
# File 'lib/ukiryu/executable_locator.rb', line 210

def build(path, source, context, alias_definition = nil)
  {
    path: path,
    info: Models::ExecutableInfo.new(
      path: path,
      source: source,
      shell: context.shell_sym,
      alias_definition: alias_definition
    )
  }
end