Class: EventQ::MessageArgs

Inherits:
Object
  • Object
show all
Defined in:
lib/eventq_base/message_args.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, retry_attempts:, context: {}, content_type:, id: nil, sent: nil) ⇒ MessageArgs

Returns a new instance of MessageArgs.



12
13
14
15
16
17
18
19
20
21
# File 'lib/eventq_base/message_args.rb', line 12

def initialize(type:, retry_attempts:, context: {}, content_type:, id: nil, sent: nil)
  @type = type
  @retry_attempts = retry_attempts
  @abort = false
  @drop = false
  @context = context
  @content_type = content_type
  @id = id
  @sent = sent
end

Instance Attribute Details

#abortObject

Returns the value of attribute abort.



6
7
8
# File 'lib/eventq_base/message_args.rb', line 6

def abort
  @abort
end

#content_typeObject (readonly)

Returns the value of attribute content_type.



4
5
6
# File 'lib/eventq_base/message_args.rb', line 4

def content_type
  @content_type
end

#contextObject (readonly)

Returns the value of attribute context.



8
9
10
# File 'lib/eventq_base/message_args.rb', line 8

def context
  @context
end

#dropObject

Returns the value of attribute drop.



7
8
9
# File 'lib/eventq_base/message_args.rb', line 7

def drop
  @drop
end

#idObject (readonly)

Returns the value of attribute id.



9
10
11
# File 'lib/eventq_base/message_args.rb', line 9

def id
  @id
end

#retry_attemptsObject (readonly)

Returns the value of attribute retry_attempts.



5
6
7
# File 'lib/eventq_base/message_args.rb', line 5

def retry_attempts
  @retry_attempts
end

#sentObject (readonly)

Returns the value of attribute sent.



10
11
12
# File 'lib/eventq_base/message_args.rb', line 10

def sent
  @sent
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/eventq_base/message_args.rb', line 3

def type
  @type
end