Class: Pgque::Message
- Inherits:
-
Object
- Object
- Pgque::Message
- Defined in:
- lib/pgque/message.rb
Instance Attribute Summary collapse
-
#batch_id ⇒ Object
readonly
Returns the value of attribute batch_id.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#extra1 ⇒ Object
readonly
Returns the value of attribute extra1.
-
#extra2 ⇒ Object
readonly
Returns the value of attribute extra2.
-
#extra3 ⇒ Object
readonly
Returns the value of attribute extra3.
-
#extra4 ⇒ Object
readonly
Returns the value of attribute extra4.
-
#msg_id ⇒ Object
readonly
Returns the value of attribute msg_id.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
-
#retry_count ⇒ Object
readonly
Returns the value of attribute retry_count.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(msg_id:, batch_id:, type:, payload:, retry_count:, created_at:, extra1: nil, extra2: nil, extra3: nil, extra4: nil) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(msg_id:, batch_id:, type:, payload:, retry_count:, created_at:, extra1: nil, extra2: nil, extra3: nil, extra4: nil) ⇒ Message
Returns a new instance of Message.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/pgque/message.rb', line 8 def initialize(msg_id:, batch_id:, type:, payload:, retry_count:, created_at:, extra1: nil, extra2: nil, extra3: nil, extra4: nil) @msg_id = msg_id @batch_id = batch_id @type = type @payload = payload @retry_count = retry_count @created_at = created_at @extra1 = extra1 @extra2 = extra2 @extra3 = extra3 @extra4 = extra4 end |
Instance Attribute Details
#batch_id ⇒ Object (readonly)
Returns the value of attribute batch_id.
5 6 7 |
# File 'lib/pgque/message.rb', line 5 def batch_id @batch_id end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
5 6 7 |
# File 'lib/pgque/message.rb', line 5 def created_at @created_at end |
#extra1 ⇒ Object (readonly)
Returns the value of attribute extra1.
5 6 7 |
# File 'lib/pgque/message.rb', line 5 def extra1 @extra1 end |
#extra2 ⇒ Object (readonly)
Returns the value of attribute extra2.
5 6 7 |
# File 'lib/pgque/message.rb', line 5 def extra2 @extra2 end |
#extra3 ⇒ Object (readonly)
Returns the value of attribute extra3.
5 6 7 |
# File 'lib/pgque/message.rb', line 5 def extra3 @extra3 end |
#extra4 ⇒ Object (readonly)
Returns the value of attribute extra4.
5 6 7 |
# File 'lib/pgque/message.rb', line 5 def extra4 @extra4 end |
#msg_id ⇒ Object (readonly)
Returns the value of attribute msg_id.
5 6 7 |
# File 'lib/pgque/message.rb', line 5 def msg_id @msg_id end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
5 6 7 |
# File 'lib/pgque/message.rb', line 5 def payload @payload end |
#retry_count ⇒ Object (readonly)
Returns the value of attribute retry_count.
5 6 7 |
# File 'lib/pgque/message.rb', line 5 def retry_count @retry_count end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/pgque/message.rb', line 5 def type @type end |