Sha256: 9544540d6de086c3d8bb963fb9c8648a0362f91a222bc4e376880f7a201c796b
Contents?: true
Size: 358 Bytes
Versions: 3
Compression:
Stored size: 358 Bytes
Contents
# frozen_string_literal: true module Yael class DispatchMap def initialize(block) @routes = [] instance_eval(&block) end attr_reader :routes protected def dispatch(descriptor, to:, queue: :default, after: nil) @routes.push Route.new descriptor: descriptor, target: to, queue: queue, delay: after end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
yael-0.0.3 | lib/yael/dispatch_map.rb |
yael-0.0.2 | lib/yael/dispatch_map.rb |
yael-0.0.1 | lib/yael/dispatch_map.rb |