Sha256: 5e4b0cf2eefa3649830836efa081ef81768421ff3253f175880d75f1d7a3981f

Contents?: true

Size: 521 Bytes

Versions: 6

Compression:

Stored size: 521 Bytes

Contents

# frozen_string_literal: true

module Sidekiq
  module Logstash
    # Class that allows to configure the gem behaviour.
    class Configuration
      attr_accessor :custom_options, :filter_args, :job_start_log

      def initialize
        @filter_args = []
        @job_start_log = false
      end

      # Added to ensure custom_options is a Proc
      def custom_options=(proc)
        raise ArgumentError, 'Argument must be a Proc.' unless proc.is_a?(Proc)

        @custom_options = proc
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sidekiq-logstash-2.0.3 lib/sidekiq/logstash/configuration.rb
sidekiq-logstash-2.0.2 lib/sidekiq/logstash/configuration.rb
sidekiq-logstash-2.0.1 lib/sidekiq/logstash/configuration.rb
sidekiq-logstash-1.2.1 lib/sidekiq/logstash/configuration.rb
sidekiq-logstash-2.0.0 lib/sidekiq/logstash/configuration.rb
sidekiq-logstash-1.2.0 lib/sidekiq/logstash/configuration.rb