• 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/message.rb
1
# This class represents a message. All other objects dela with passing around instances of this class.
2
# A message must have a subject and a body. The subject represents the handlers name and the body represents
3
# the payload of the process method in the handler.
4
# When messages are stored in the queues, they are serialized.
UNCOV
5
module DispatchRider
×
UNCOV
6
  class Message
×
UNCOV
7
    include ActiveModel::Validations
×
8

UNCOV
9
    attr_accessor :subject, :body
×
10

UNCOV
11
    validates :subject, :presence => true
×
12

UNCOV
13
    def initialize(options)
×
UNCOV
14
      attrs = options.symbolize_keys
×
UNCOV
15
      @subject = attrs[:subject]
×
UNCOV
16
      @body = attrs[:body] || {}
×
UNCOV
17
      raise RecordInvalid.new(self, errors.full_messages) unless valid?
×
UNCOV
18
    end
×
19

UNCOV
20
    def attributes
×
UNCOV
21
      { subject: subject, body: body }
×
UNCOV
22
    end
×
23

UNCOV
24
    def as_json(*)
×
UNCOV
25
      attributes
×
UNCOV
26
    end
×
27

UNCOV
28
    def ==(other)
×
UNCOV
29
      return false unless other.respond_to? :attributes
×
UNCOV
30
      attributes == other.attributes
×
UNCOV
31
    end
×
UNCOV
32
  end
×
UNCOV
33
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