Module: SmartCore::Operation::ClassConstructor Private

Defined in:
lib/smart_core/operation/class_constructor.rb

Overview

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.

Since:

  • 0.1.0

Defined Under Namespace

Classes: Parameters

Constant Summary collapse

CONSYSTENCY_CONTROL =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Returns:

  • (SmartCore::Engine::Lock)

Since:

  • 0.1.0

SmartCore::Engine::Lock.new

Class Method Summary collapse

Class Method Details

.construct(klass = Class.new(SmartCore::Operation), type_system: default_type_system) ⇒ Class<SmartCore::Operation>

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.

Parameters:

  • klass (Class, Class<SmartCore::Operation>) (defaults to: Class.new(SmartCore::Operation))
  • type_system (Hash) (defaults to: default_type_system)

    a customizable set of options

Options Hash (type_system:):

  • (String, Symbol)

Returns:

Since:

  • 0.1.0



21
22
23
24
25
26
27
28
# File 'lib/smart_core/operation/class_constructor.rb', line 21

def construct(klass = Class.new(SmartCore::Operation), type_system: default_type_system)
  klass.tap do
    consistent do
      parameters = Parameters.new(type_system: type_system)
      inject_initializer_interface(klass, parameters)
    end
  end
end

.default_type_systemString, Symbol

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:

  • (String, Symbol)

Since:

  • 0.1.0



34
35
36
# File 'lib/smart_core/operation/class_constructor.rb', line 34

def default_type_system
  SmartCore::Initializer::Configuration[:default_type_system]
end