Sha256: a9efc7bc141872da12eb2be15456279abeb409f874c881b31f84bdd5d03b5efd
Contents?: true
Size: 808 Bytes
Versions: 17
Compression:
Stored size: 808 Bytes
Contents
require File.dirname(__FILE__) + "/command_handler_chain_link" class CommandHandlerChainFactory @@dsls = {} def self.def_dsl(dsl, *command_handler_array) @@last_chain_link = nil @@chain = nil command_handler_array.each do |command_handler| Glimmer.logger.debug "Loading #{command_handler.class.to_s}..." chain_link = CommandHandlerChainLink.new(command_handler) @@last_chain_link.chain_to(chain_link) if @@last_chain_link @@last_chain_link = chain_link @@chain = chain_link unless @@chain end @@dsls[dsl] = { :last_chain_link => @@last_chain_link, :chain => @@chain } end def self.select_dsl(dsl) @@last_chain_link = @@dsls[dsl][:last_chain_link] @@chain = @@dsls[dsl][:chain] end def self.chain @@chain end end
Version data entries
17 entries across 17 versions & 1 rubygems