Spec-Zone.ru › Homebrew

Module: Singleton Private

Defined in:
extend/object/duplicable/singleton.rb

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

Instance Method Summary collapse

  • #duplicable? ⇒ false private

    Singleton instances are not duplicable:.

Instance Method Details

#duplicable? ⇒ false

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.

Singleton instances are not duplicable:

Class.new.include(Singleton).instance.dup # TypeError (can't dup instance of singleton

Returns:

  • (false)


11
# File 'extend/object/duplicable/singleton.rb', line 11

def duplicable? = false

© 2009–present Homebrew contributors
Licensed under the BSD 2-Clause License.
https://docs.brew.sh/rubydoc/Singleton.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API