Class: Sinclair::MethodDefinition::CallDefinition Private
- Inherits:
-
MethodDefinition
- Object
- MethodDefinition
- Sinclair::MethodDefinition::CallDefinition
- Defined in:
- lib/sinclair/method_definition/call_definition.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.
Define a call of method to e done within the class
Instance Method Summary collapse
-
#code_block ⇒ Proc
private
Block to be evaluated by the class when adding methods.
-
#initialize(method_name, *arguments) ⇒ CallDefinition
constructor
private
A new instance of CallDefinition.
Constructor Details
#initialize(method_name, *arguments) ⇒ CallDefinition
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.
Returns a new instance of CallDefinition.
15 16 17 18 |
# File 'lib/sinclair/method_definition/call_definition.rb', line 15 def initialize(method_name, *arguments) @arguments = arguments super(method_name) end |
Instance Method Details
#code_block ⇒ Proc
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.
Block to be evaluated by the class when adding methods
The block will be a call from method_name passing arguments
as arguments
28 29 30 31 32 33 34 35 |
# File 'lib/sinclair/method_definition/call_definition.rb', line 28 def code_block method_name = name args = arguments proc do send(method_name, *args) end end |