Class: Osbourne::Test::Message

Inherits:
Message
  • Object
show all
Defined in:
lib/osbourne/test/message.rb

Instance Attribute Summary collapse

Attributes inherited from Message

#message

Instance Method Summary collapse

Methods inherited from Message

#json?, #message_body

Constructor Details

#initialize(topic:, body:) ⇒ Message

Returns a new instance of Message.



7
8
9
10
# File 'lib/osbourne/test/message.rb', line 7

def initialize(topic:, body:)
  @topic = topic
  @raw_body = body
end

Instance Attribute Details

#raw_bodyObject (readonly)

Returns the value of attribute raw_body.



6
7
8
# File 'lib/osbourne/test/message.rb', line 6

def raw_body
  @raw_body
end

#topicObject (readonly)

Returns the value of attribute topic.



6
7
8
# File 'lib/osbourne/test/message.rb', line 6

def topic
  @topic
end

Instance Method Details

#deleteObject



20
# File 'lib/osbourne/test/message.rb', line 20

def delete; end

#idObject



12
13
14
# File 'lib/osbourne/test/message.rb', line 12

def id
  @id ||= SecureRandom.uuid
end

#sns?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/osbourne/test/message.rb', line 22

def sns?
  true
end

#valid?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/osbourne/test/message.rb', line 16

def valid?
  true
end