rad.router class Router < Rad::Conveyors::Processor inject router: :router def initialize next_processor, class_variable = :class, method_variable = :method super(next_processor) @class_variable, @method_variable = class_variable, method_variable end def call halt = catch :halt do if workspace[@class_variable].blank? or workspace[@method_variable].blank? klass, method, params = router.decode workspace.path, workspace.params workspace[@class_variable], workspace[@method_variable], workspace.params = klass, method, params end nil end next_processor.call unless halt end end