Module: Transproc::Registry::ClassMethods Private
- Defined in:
- lib/transproc/registry.rb
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.
Instance Method Summary collapse
-
#included(other) ⇒ Object
private
Makes ‘[]` and all functions defined in the included modules accessible in their receiver.
-
#method_added(name) ⇒ Object
private
Makes newly module-defined functions accessible via ‘[]` method by adding it to the module’s eigenclass.
-
#method_undefined(name) ⇒ Object
private
Makes undefined methods inaccessible via ‘[]` method by undefining it from the module’s eigenclass.
Instance Method Details
#included(other) ⇒ Object
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.
Makes ‘[]` and all functions defined in the included modules accessible in their receiver
105 106 107 |
# File 'lib/transproc/registry.rb', line 105 def included(other) other.extend(Transproc::Registry, self) end |
#method_added(name) ⇒ Object
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.
Makes newly module-defined functions accessible via ‘[]` method by adding it to the module’s eigenclass
113 114 115 |
# File 'lib/transproc/registry.rb', line 113 def method_added(name) module_function(name) end |
#method_undefined(name) ⇒ Object
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.
Makes undefined methods inaccessible via ‘[]` method by undefining it from the module’s eigenclass
121 122 123 |
# File 'lib/transproc/registry.rb', line 121 def method_undefined(name) singleton_class.__send__(:undef_method, name) end |