Class: AwsSqsMoniter::TypedMessage

Inherits:
Object
  • Object
show all
Defined in:
lib/aws_sqs_moniter/typed_message.rb

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ TypedMessage

Returns a new instance of TypedMessage.



3
4
5
# File 'lib/aws_sqs_moniter/typed_message.rb', line 3

def initialize(message)
  @message = message
end

Instance Method Details

#bodyObject



19
20
21
# File 'lib/aws_sqs_moniter/typed_message.rb', line 19

def body
  hash['body']
end

#idObject



7
8
9
# File 'lib/aws_sqs_moniter/typed_message.rb', line 7

def id
  headers['id']
end

#to_hObject



23
24
25
# File 'lib/aws_sqs_moniter/typed_message.rb', line 23

def to_h
  hash
end

#typeObject



11
12
13
# File 'lib/aws_sqs_moniter/typed_message.rb', line 11

def type
  headers['type']
end

#versionObject



15
16
17
# File 'lib/aws_sqs_moniter/typed_message.rb', line 15

def version
  headers['version']
end