Sha256: 1e147cf20eab745da44012ca37a04af61f97006937d83f38209fa254e0ceb030
Contents?: true
Size: 676 Bytes
Versions: 24
Compression:
Stored size: 676 Bytes
Contents
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
Version data entries
24 entries across 24 versions & 1 rubygems