Class: SmartCore::Initializer::Attribute::ValueFinalizer::Method Private

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

Instance Method Summary collapse

Constructor Details

#initialize(finalizer) ⇒ 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:

  • finalizer (String, Symbol)

Since:

  • 0.5.0



11
12
13
# File 'lib/smart_core/initializer/attribute/value_finalizer/method.rb', line 11

def initialize(finalizer)
  @finalizer = finalizer
end

Instance Method Details

#finalize(value, instance) ⇒ Any

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:

  • value (Any)
  • instance (Any)

Returns:

  • (Any)

Since:

  • 0.5.0



21
22
23
# File 'lib/smart_core/initializer/attribute/value_finalizer/method.rb', line 21

def finalize(value, instance)
  instance.send(finalizer, value)
end