Class: Module Private

Inherits:
Object show all
Defined in:
extend/module.rb,
extend/object/deep_dup.rb

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

Instance Method Summary collapse

Instance Method Details

#deep_dupT.self_type

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.

Returns a copy of module or class if it's anonymous. If it's named, returns +self+.

Object.deep_dup == Object # => true klass = Class.new klass.deep_dup == klass # => false

Returns:

  • (T.self_type)


70
71
72
73
74
75
76
# File 'extend/object/deep_dup.rb', line 70

def deep_dup
  if name.nil?
    super
  else
    self
  end
end

#exclude?(mod) ⇒ Boolean

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.

The inverse of Module#include?. Returns true if the module does not include the other module.

Parameters:

  • mod (T::Module[T.anything])

Returns:

  • (Boolean)


10
# File 'extend/module.rb', line 10

def exclude?(mod) = !include?(mod)