Sha256: 47c26c25a7168282dbc8faa3cf1ddbbac62c0f0af78e064346ab5149c6872619
Contents?: true
Size: 644 Bytes
Versions: 19
Compression:
Stored size: 644 Bytes
Contents
# frozen_string_literal: true module SmartCore::Initializer::Attribute::Finalizer # @pai private # @since 0.1.0 class AnonymousBlock < Abstract # @param finalizer [Proc] # @return [void] # # @api private # @since 0.1.0 def initialize(finalizer) @finalizer = finalizer end # @param value [Any] # @param instance [Any] # @return [value] # # @pai private # @since 0.1.0 def call(value, instance) instance.instance_exec(value, &finalizer) end private # @return [NilClass, Any] # # @api private # @since 0.1.0 attr_reader :finalizer end end
Version data entries
19 entries across 19 versions & 1 rubygems