Class: Sinclair::MethodDefinitions Private
- Inherits:
-
Object
- Object
- Sinclair::MethodDefinitions
- Defined in:
- lib/sinclair/method_definitions.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Enumerator holding all method definitions
Instance Method Summary collapse
-
#add(name, code = nil, **options, &block) ⇒ Object
private
Builds and adds new definition.
Instance Method Details
#add(definition_class, name, code = nil, **options) ⇒ Object #add(definition_class, name, **options, &block) ⇒ 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.
Builds and adds new definition
25 26 27 |
# File 'lib/sinclair/method_definitions.rb', line 25 def add(name, code = nil, **, &block) definitions << MethodDefinition.from(name, code, **, &block) end |