• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

payrollhero / dispatch-rider / #3015

02 Sep 2022 11:22PM UTC coverage: 0.409% (-84.7%) from 85.154%
#3015

push

web-flow
Layout/SpaceInsideStringInterpolation-20220901233630 (#89)

* :police_car: regenerate rubocop todo

* :police_car: Layout/SpaceInsideStringInterpolation

* :police_car: regenerate rubocop todo

Co-authored-by: Rubocop Challenger <rubocop@payrollhero.com>

0 of 1 new or added line in 1 file covered. (0.0%)

1529 existing lines in 63 files now uncovered.

7 of 1711 relevant lines covered (0.41%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lib/dispatch-rider/dispatcher.rb
1
# This class is responsible for dispatching the messages to the appropriate handler.
2
# The handlers must be registered with the dispatcher.
3
# Tha handlers need to be modules that implement the process method.
4
# What handler to dispatch the message to is figured out from the subject of the message.
5

UNCOV
6
require 'forwardable'
×
7

UNCOV
8
module DispatchRider
×
UNCOV
9
  class Dispatcher
×
UNCOV
10
    extend Forwardable
×
11

UNCOV
12
    include Callbacks::Support
×
13

UNCOV
14
    attr_reader :handler_registrar
×
15

UNCOV
16
    def_delegators :handler_registrar, :register, :fetch, :unregister
×
17

UNCOV
18
    def initialize
×
UNCOV
19
      @handler_registrar = Registrars::Handler.new
×
UNCOV
20
    end
×
21

UNCOV
22
    def dispatch(message)
×
UNCOV
23
      callbacks.invoke(:dispatch_message, message) do
×
UNCOV
24
        handler_registrar.fetch(message.subject).new.do_process(message)
×
UNCOV
25
      end
×
UNCOV
26
      true # success => true (delete message)
×
UNCOV
27
    end
×
UNCOV
28
  end
×
UNCOV
29
end
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc