Sha256: e2d4a9f5fa5d9046f8e930b6e38efb81864df57df84ed46a9d8c6c11ce04884c

Contents?: true

Size: 606 Bytes

Versions: 3

Compression:

Stored size: 606 Bytes

Contents

# frozen_string_literal: true

module Wamp
  module MessageHandler
    # callback for unregister message
    class Unregistered < Base
      def handle
        validate_received_message

        delete_procedure store.delete(alt_store_key)

        deliver_response(response)
      end

      def response
        Type::Success.new
      end

      def alt_store_key
        "registration_#{registration_id}"
      end

      def delete_procedure(data)
        store.delete data.fetch(:procedure)
      end

      def registration_id
        stored_data.fetch(:registration_id)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
xconn-0.1.2 lib/wamp/message_handler/unregistered.rb
xconn-0.1.1 lib/wamp/message_handler/unregistered.rb
xconn-0.1.0 lib/wamp/message_handler/unregistered.rb