Class: Wamp::MessageHandler::Result

Inherits:
Base
  • Object
show all
Defined in:
lib/wamp/message_handler/result.rb

Overview

Result

Instance Attribute Summary

Attributes inherited from Base

#connection, #message

Instance Method Summary collapse

Methods inherited from Base

#initialize, #send_message

Constructor Details

This class inherits a constructor from Wamp::MessageHandler::Base

Instance Method Details

#handleObject



7
8
9
10
11
12
13
14
# File 'lib/wamp/message_handler/result.rb', line 7

def handle
  validate_received_message
  if message.details[:progress]
    store[store_key].fetch(:handler).call(response)
  else
    stored_data.fetch(:handler).call(response)
  end
end

#responseObject



16
17
18
# File 'lib/wamp/message_handler/result.rb', line 16

def response
  Type::Result.new(args: message.args, kwargs: message.kwargs, details: message.details)
end