Sha256: 9c4578b7d27b59b489af5d667db9230387d7cd5a4be6e0652fd130dc1211ca1b

Contents?: true

Size: 427 Bytes

Versions: 4

Compression:

Stored size: 427 Bytes

Contents

# frozen_string_literal: true

module Clowne
  module Adapters
    class Base
      module Nullify # :nodoc: all
        def self.call(_source, record, declaration, **_options)
          declaration.attributes.each do |attr|
            record.__send__("#{attr}=", nil)
          end

          record
        end
      end
    end
  end
end

Clowne::Adapters::Base.register_resolver(:nullify, Clowne::Adapters::Base::Nullify)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
clowne-0.2.0 lib/clowne/adapters/base/nullify.rb
clowne-0.1.0 lib/clowne/adapters/base/nullify.rb
clowne-0.1.0.beta1 lib/clowne/adapters/base/nullify.rb
clowne-0.1.0.pre1 lib/clowne/adapters/base/nullify.rb