Class: Wamp::MessageHandler::Error

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

Overview

Call handler with error message

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
# File 'lib/wamp/message_handler/error.rb', line 7

def handle
  validate_received_message

  stored_data[:callback].call(response)
end

#responseObject



13
14
15
# File 'lib/wamp/message_handler/error.rb', line 13

def response
  Type::Error.new(uri: message.error, details: message.details)
end