Class: SmartCore::Initializer::Constructor Private

Inherits:
Object
  • Object
show all
Defined in:
lib/smart_core/initializer/constructor.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.

Since:

  • 0.1.0

Defined Under Namespace

Classes: Definer

Instance Method Summary collapse

Constructor Details

#initialize(klass, arguments, block) ⇒ void

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:

Since:

  • 0.1.0



15
16
17
18
19
20
# File 'lib/smart_core/initializer/constructor.rb', line 15

def initialize(klass, arguments, block)
  @klass = klass
  @arguments = arguments
  @parameters, @options = extract_attributes(arguments)
  @block = block
end

Instance Method Details

#constructAny

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:

  • (Any)

Since:

  • 0.1.0



26
27
28
29
30
31
32
33
34
# File 'lib/smart_core/initializer/constructor.rb', line 26

def construct
  allocate_klass_instance.tap do |instance|
    prevent_attribute_insufficiency
    initialize_parameters(instance)
    initialize_options(instance)
    process_original_initializer(instance)
    process_init_extensions(instance)
  end
end