Module: MachOPathname::ClassMethods

Included in:
MachOPathname
Defined in:
extend/os/mac/extend/pathname.rb

Instance Method Summary collapse

Instance Method Details

#wrap(path) ⇒ MachOShim

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Parameters:

Returns:



9
10
11
12
13
14
15
# File 'extend/os/mac/extend/pathname.rb', line 9

def wrap(path)
  return path if path.is_a?(MachOShim)

  path = ::Pathname.new(path)
  path.extend(MachOShim)
  T.cast(path, MachOShim)
end