Class: WaterDrop::Contracts::Message

Inherits:
WaterDrop::Contractable::Contract show all
Defined in:
lib/waterdrop/contracts/message.rb

Overview

Contract with validation rules for validating that all the message options that we provide to producer ale valid and usable

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from WaterDrop::Contractable::Contract

#call, nested, optional, required, #validate!, virtual

Methods included from WaterDrop::Configurable

extended, included

Constructor Details

#initialize(max_payload_size:) ⇒ Message

Returns a new instance of Message.

Parameters:

  • max_payload_size (Integer)

    max payload size



24
25
26
27
# File 'lib/waterdrop/contracts/message.rb', line 24

def initialize(max_payload_size:)
  super()
  @max_payload_size = max_payload_size
end

Instance Attribute Details

#max_payload_sizeObject (readonly)

Returns the value of attribute max_payload_size.



21
22
23
# File 'lib/waterdrop/contracts/message.rb', line 21

def max_payload_size
  @max_payload_size
end