Class: Module Private
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
-
#deep_dup ⇒ T.self_type
private
Returns a copy of module or class if it's anonymous.
Instance Method Details
#deep_dup ⇒ T.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
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 |