Class: SmartCore::Initializer::Attribute::Finalizer::InstanceMethod Private

Inherits:
Abstract
  • Object
show all
Defined in:
lib/smart_core/initializer/attribute/finalizer/instance_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.1.0

Instance Method Summary collapse

Methods inherited from Abstract

#dup

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.1.0



12
13
14
# File 'lib/smart_core/initializer/attribute/finalizer/instance_method.rb', line 12

def initialize(finalizer)
  @finalizer = finalizer
end

Instance Method Details

#call(value, instance) ⇒ value

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:

  • (value)

Since:

  • 0.1.0



22
23
24
# File 'lib/smart_core/initializer/attribute/finalizer/instance_method.rb', line 22

def call(value, instance)
  instance.__send__(finalizer, value)
end