Sha256: 0172040dfc2eb5b0f64cade27789e21ca5c05919e948429a3133e6d939eaa9fe
Contents?: true
Size: 640 Bytes
Versions: 5
Compression:
Stored size: 640 Bytes
Contents
# Steering A job's router can receive arguments computed dynamically by `::steer`. Steering enables [batch routing](/cookbook/batch_routing). For example, the following router has hostname and path hard-coded: ```ruby class DummyJob < Wayfarer::Base route do host "example.com", path: "/contact", to: :index end end ``` Instead, hostname and path could be provided by `::steer`, too: ```ruby class DummyJob < Wayfarer::Base route do |hostname, path| host hostname, path: path, to: :index end steer do |_task| ["example.com", "/contact"] end end ``` Note that `steer` yields the current [task](/guides/tasks).
Version data entries
5 entries across 5 versions & 1 rubygems