class DispatchRider::Message
Attributes
body[RW]
subject[RW]
Public Class Methods
new(options)
click to toggle source
# File lib/dispatch-rider/message.rb, line 13 def initialize(options) attrs = options.symbolize_keys @subject = attrs[:subject] @body = attrs[:body] || {} raise RecordInvalid.new(self, errors.full_messages) unless valid? end
Public Instance Methods
==(other)
click to toggle source
# File lib/dispatch-rider/message.rb, line 28 def ==(other) return false unless other.respond_to? :attributes attributes == other.attributes end
as_json(*)
click to toggle source
# File lib/dispatch-rider/message.rb, line 24 def as_json(*) attributes end
attributes()
click to toggle source
# File lib/dispatch-rider/message.rb, line 20 def attributes { subject: subject, body: body } end