Sha256: 6d9e64a97ff19234a9d33c10f535dcc232f1713d01a6c9946df365a2e3653dea

Contents?: true

Size: 905 Bytes

Versions: 40

Compression:

Stored size: 905 Bytes

Contents

# frozen_string_literal: true

module RubyRabbitmqJanus
  module Tools
    module Replaces
      # Format message request with good data to HASH format for Session
      # request.
      # Manage session and plugin.
      #
      # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>
      class Session < Replace
        private

        def replace_element_classic
          super
          replace_session if request.key?('session_id')
          replace_plugin if request.key?('plugin')
        end

        def replace_session
          request['session_id'] = type.convert('session_id', opts)
        rescue => exception
          ::Log.warn "Error session replace : #{exception}"
        end

        def replace_plugin
          request['plugin'] = type.convert('plugin')
        rescue => exception
          ::Log.warn "Error plugin replace : #{exception}"
        end
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
ruby_rabbitmq_janus-3.0.0.pre.336 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-3.0.0.pre.335 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-3.0.0.pre.334 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-3.0.0.pre.330 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-3.0.0.pre.328 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-3.0.0.pre.327 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.7.2 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.7.2.pre.322 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.7.2.pre.320 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.7.2.pre.319 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.7.2.pre.318 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.7.2.pre.317 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.7.2.pre.316 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.7.2.pre.315 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.7.2.pre.314 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.7.2.pre.312 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.7.2.pre.310 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.7.2.pre.309 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.7.2.pre.308 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.7.2.pre.307 lib/rrj/tools/replaces/session.rb