Sha256: 7183a29c2a9034940fad44c9d8c99ad85a12cc955d7f24e68b2fee25656a892b

Contents?: true

Size: 461 Bytes

Versions: 3

Compression:

Stored size: 461 Bytes

Contents

# frozen_string_literal: true

module Clowne
  class Resolvers
    module AfterPersist # :nodoc: all
      def self.call(source, record, declaration, params:, **_options)
        operation = Clowne::Utils::Operation.current
        params ||= {}
        operation.add_after_persist(
          proc do
            declaration.block.call(source, record, **params.merge(mapper: operation.mapper))
          end
        )
        record
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
clowne-1.5.0 lib/clowne/resolvers/after_persist.rb
clowne-1.4.0 lib/clowne/resolvers/after_persist.rb
clowne-1.3.0 lib/clowne/resolvers/after_persist.rb