Sha256: 3d4eb4964c3b66dc54ca11617b8f2ac6c1273ae22b20bf56d777863f43d4d3c8
Contents?: true
Size: 571 Bytes
Versions: 7
Compression:
Stored size: 571 Bytes
Contents
require 'rhcp/rhcp_exception' require 'rhcp/broker' module RHCP class DispatchingBroker < RHCP::Broker def initialize @known_commands = Hash.new() end # returns a list of all known commands def get_command_list() @known_commands end def add_broker(new_broker) new_broker.get_command_list.each do |name, command| raise RHCP::RhcpException.new("duplicate command: '#{name}' has already been defined.") if @known_commands.has_key?(name) @known_commands[name] = command end end end end
Version data entries
7 entries across 7 versions & 1 rubygems