Sha256: 3f509e06f4803fdb0ae33e0df7fbb6d5bb36f7ceaedd94f8fae943af410c0af4

Contents?: true

Size: 836 Bytes

Versions: 32

Compression:

Stored size: 836 Bytes

Contents

# frozen_string_literal: true

# :reek:FeatureEnvy

module RubyRabbitmqJanus
  module Tools
    # Subclass for Config
    #
    # Options about bunny
    #
    # @see RubyRabbitmqJanus::Tools::Config
    module ConfigRabbit
      # @return [String] read configuration fir queue admin
      def admin_pass
        @options['rabbit']['admin_pass'].to_s
      end

      # @return [Symbol] read configuration for bunny log level
      def log_level_rabbit
        @options['rabbit']['level'].upcase.to_sym || :INFO
      end

      # @return [Hash] Format hash for bunny settings
      def server_settings
        Hash[%w[host port pass user vhost log_level].map do |value|
          [
            value.to_sym,
            @options['rabbit'][value.eql?('log_level') ? 'level' : value]
          ]
        end]
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
ruby_rabbitmq_janus-3.0.0.pre.334 lib/rrj/tools/gem/config/rabbit.rb
ruby_rabbitmq_janus-3.0.0.pre.330 lib/rrj/tools/gem/config/rabbit.rb
ruby_rabbitmq_janus-3.0.0.pre.328 lib/rrj/tools/gem/config/rabbit.rb
ruby_rabbitmq_janus-3.0.0.pre.327 lib/rrj/tools/gem/config/rabbit.rb
ruby_rabbitmq_janus-2.7.2 lib/rrj/tools/gem/config/rabbit.rb
ruby_rabbitmq_janus-2.7.2.pre.322 lib/rrj/tools/gem/config/rabbit.rb
ruby_rabbitmq_janus-2.7.2.pre.320 lib/rrj/tools/gem/config/rabbit.rb
ruby_rabbitmq_janus-2.7.2.pre.319 lib/rrj/tools/gem/config/rabbit.rb
ruby_rabbitmq_janus-2.7.2.pre.318 lib/rrj/tools/gem/config/rabbit.rb
ruby_rabbitmq_janus-2.7.2.pre.317 lib/rrj/tools/gem/config/rabbit.rb
ruby_rabbitmq_janus-2.7.2.pre.316 lib/rrj/tools/gem/config/rabbit.rb
ruby_rabbitmq_janus-2.7.2.pre.315 lib/rrj/tools/gem/config/rabbit.rb
ruby_rabbitmq_janus-2.7.2.pre.314 lib/rrj/tools/gem/config/rabbit.rb
ruby_rabbitmq_janus-2.7.2.pre.312 lib/rrj/tools/gem/config/rabbit.rb
ruby_rabbitmq_janus-2.7.2.pre.310 lib/rrj/tools/gem/config/rabbit.rb
ruby_rabbitmq_janus-2.7.2.pre.309 lib/rrj/tools/gem/config/rabbit.rb
ruby_rabbitmq_janus-2.7.2.pre.308 lib/rrj/tools/gem/config/rabbit.rb
ruby_rabbitmq_janus-2.7.2.pre.307 lib/rrj/tools/gem/config/rabbit.rb
ruby_rabbitmq_janus-2.7.2.pre.306 lib/rrj/tools/gem/config/rabbit.rb
ruby_rabbitmq_janus-2.7.2.pre.305 lib/rrj/tools/gem/config/rabbit.rb