Sha256: 30528d95e8205456a10f26e0124a98b80bb65dffee5e3ccfb52a3861e1cd71de

Contents?: true

Size: 730 Bytes

Versions: 31

Compression:

Stored size: 730 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)
        end

        def replace_plugin
          request['plugin'] = type.convert('plugin')
        end
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
ruby_rabbitmq_janus-4.0.1 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-4.0.1.pre.1265973744 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-4.0.1.pre.1265506307 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-4.0.1.pre.1265140558 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-4.0.0 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-4.0.0.pre.1001345090 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-4.0.0.pre.1001181479 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-4.0.0.pre.1001132533 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-4.0.0.pre.1001107243 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-4.0.0.pre.1001043172 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-4.0.0.pre.949167646 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-4.0.0.pre.946892338 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-4.0.0.pre.946565704 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-4.0.0.pre.939149205 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-4.0.0.pre.939137013 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-4.0.0.pre.939133437 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-4.0.0.pre.939119110 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-4.0.0.pre.939113634 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-4.0.0.pre.850041590 lib/rrj/tools/replaces/session.rb
ruby_rabbitmq_janus-3.0.1 lib/rrj/tools/replaces/session.rb