Sha256: 320e816a8f48d4319b79b961212058b27b7c5b2b44ca64ac5ea53e1addbcfbb5
Contents?: true
Size: 456 Bytes
Versions: 15
Compression:
Stored size: 456 Bytes
Contents
# frozen_string_literal: true module RailwayIpc HandlerManifest = Struct.new(:message, :handler) class HandlerStore attr_reader :handler_map def initialize @handler_map = {} end def registered handler_map.keys end def register(message:, handler:) handler_map[message.to_s] = HandlerManifest.new(message, handler) end def get(response_message) handler_map[response_message] end end end
Version data entries
15 entries across 15 versions & 1 rubygems