lib/sidekiq/encrypted_args.rb
def configure!(secret: nil)
        self.secret = secret unless secret.nil?

        Sidekiq.configure_client do |config|
          config.client_middleware do |chain|
            chain.prepend Sidekiq::EncryptedArgs::ClientMiddleware
          end
        end

        Sidekiq.configure_server do |config|
          config.server_middleware do |chain|
            chain.add Sidekiq::EncryptedArgs::ServerMiddleware
          end
          config.client_middleware do |chain|
            chain.prepend Sidekiq::EncryptedArgs::ClientMiddleware
          end
        end
      end
# Add the client and server middleware to the Sidekiq
# middleware chains. If you need to ensure the order of where the middleware is
# added, you can forgo this method and add it yourself.
#
# This method prepends client middleware and appends server middleware.
#
# @param [String] secret optionally set the secret here. See {.secret=}
Add the client and server middleware to the Sidekiq
middleware chains. If you need to ensure the order of where the middleware is
added, you can forgo this method and add it yourself.

This method prepends client middleware and appends server middleware.
Add the client and server middleware to the Sidekiq middleware chains . If you need to ensure the order of where the middleware is added you can forgo this method and add it yourself . This method prepends client middleware and appends server middleware .
def configure!(secret: nil)
        self.secret = secret unless secret.nil?
        Sidekiq.configure_client do |config|
          config.client_middleware do |chain|
            chain.prepend Sidekiq::EncryptedArgs::ClientMiddleware
          end
        end
        Sidekiq.configure_server do |config|
          config.server_middleware do |chain|
            chain.add Sidekiq::EncryptedArgs::ServerMiddleware
          end
          config.client_middleware do |chain|
            chain.prepend Sidekiq::EncryptedArgs::ClientMiddleware
          end
        end
      end
def configure! ( secret : nil ) self . secret = secret unless secret . nil? Sidekiq . configure_client do | config | config . client_middleware do | chain | chain . prepend Sidekiq :: EncryptedArgs :: ClientMiddleware end end Sidekiq . configure_server do | config | config . server_middleware do | chain | chain . add Sidekiq :: EncryptedArgs :: ServerMiddleware end config . client_middleware do | chain | chain . prepend Sidekiq :: EncryptedArgs :: ClientMiddleware end end end
Add the client and server middleware to the Sidekiq
middleware chains.
Add the client and server middleware to the Sidekiq middleware chains .
secret
secret optionally set the secret here. See {.secret=}
secret optionally set the secret here . See { . secret = }