Class: Sinclair::MethodBuilder::CallMethodBuilder Private

Inherits:
Base
  • Object
show all
Defined in:
lib/sinclair/method_builder/call_method_builder.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.

Build a method based on a Sinclair::MethodDefinition::CallDefinition

Author:

  • darthjee

Instance Method Summary collapse

Methods inherited from Base

build, #initialize

Constructor Details

This class inherits a constructor from Sinclair::MethodBuilder::Base

Instance Method Details

#buildNilClass

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 the method

The build uses module_eval over a class

The code is ran either on the class itself or in a block that allow creation of class methods

Returns:

  • (NilClass)


18
19
20
# File 'lib/sinclair/method_builder/call_method_builder.rb', line 18

def build
  evaluating_class.module_eval(&code_block)
end

#code_blockProc

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.

Code block to be evaluated by the class

Returns:

  • (Proc)


# File 'lib/sinclair/method_builder/call_method_builder.rb', line 23