Class: SmartCore::Validator::InstanceBuilder Private

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

Since:

  • 0.2.0

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(validator_object, validator_klass, arguments, options, 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.2.0



31
32
33
34
35
36
37
# File 'lib/smart_core/validator/instance_builder.rb', line 31

def initialize(validator_object, validator_klass, arguments, options, block)
  @validator_object = validator_object
  @validator_klass = validator_klass
  @arguments = arguments
  @options = options
  @block = block
end

Class Method Details

.call(validator_object, validator_klass, arguments, options, block) ⇒ SmartCore::Validator

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:

Returns:

Since:

  • 0.2.0



17
18
19
# File 'lib/smart_core/validator/instance_builder.rb', line 17

def call(validator_object, validator_klass, arguments, options, block)
  new(validator_object, validator_klass, arguments, options, block).call
end

Instance Method Details

#callSmartCore::Validator

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:

Since:

  • 0.2.0



43
44
45
46
47
48
49
# File 'lib/smart_core/validator/instance_builder.rb', line 43

def call
  validator_object.tap do
    initialize_core_attributes
    initialize_custom_attributes
    invoke_original_methods
  end
end