Sha256: 4b654ca3e0cae16de00fd20d3a5319110fd601d69d9a5a1523d5380f1ab7a0b0
Contents?: true
Size: 738 Bytes
Versions: 17
Compression:
Stored size: 738 Bytes
Contents
class CommandHandlerChainLink def initialize(command_handler) @command_handler = command_handler end def chain_to(next_chain_link) @next_chain_link = next_chain_link end def handle(parent, command_symbol, *args, &block) if (@command_handler.can_handle?(parent, command_symbol, *args, &block)) Glimmer.logger.debug "#{@command_handler.class.to_s} will handle command: #{command_symbol} with arguments #{args}" return @command_handler.do_handle(parent, command_symbol, *args, &block) elsif @next_chain_link return @next_chain_link.handle(parent, command_symbol, *args, &block) else Glimmer.logger.debug "Command: #{command_symbol} cannot be handled!" return nil end end end
Version data entries
17 entries across 17 versions & 1 rubygems