Class: Sinclair::MethodDefinitions Private
- 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(*args, type: nil, **options, &block) ⇒ Array<MethodDefinition>
private
Builds and adds new definition.
Instance Method Details
#add(definition_class, name, code = nil, **options) ⇒ Array<MethodDefinition> #add(definition_class, name, **options, &block) ⇒ Array<MethodDefinition> #add(type, *args, **options, &block) ⇒ Array<MethodDefinition>
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
The type is decided based in the arguments
43 44 45 |
# File 'lib/sinclair/method_definitions.rb', line 43 def add(*args, type: nil, **, &block) definitions << MethodDefinition.for(type, *args, **, &block) end |