Sha256: 8c3f75ea19d3ec86cd286090a5bb0c183448a961c601fa82923decbd114abb8e

Contents?: true

Size: 933 Bytes

Versions: 11

Compression:

Stored size: 933 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
          Tools::Log.instance.warn "Error session replace : #{exception}"
        end

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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ruby_rabbitmq_janus-2.6.0.pre.247 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.6.0.pre.246 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.6.0.pre.244 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.6.0.pre.240 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.6.0.pre.239 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.6.0.pre.238 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.6.0.pre.233 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.6.0.pre.229 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.6.0.pre.228 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.6.0.pre.227 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-2.6.0.pre.226 lib/rrj/tools/replaces/session.rb