Class: Osbourne::Test::Message
- Defined in:
- lib/osbourne/test/message.rb
Instance Attribute Summary collapse
-
#raw_body ⇒ Object
readonly
Returns the value of attribute raw_body.
-
#topic ⇒ Object
readonly
Returns the value of attribute topic.
Attributes inherited from Message
Instance Method Summary collapse
- #delete ⇒ Object
- #id ⇒ Object
-
#initialize(topic:, body:) ⇒ Message
constructor
A new instance of Message.
- #sns? ⇒ Boolean
- #valid? ⇒ Boolean
Methods inherited from Message
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_body ⇒ Object (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 |
#topic ⇒ Object (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
#delete ⇒ Object
20 |
# File 'lib/osbourne/test/message.rb', line 20 def delete; end |
#id ⇒ Object
12 13 14 |
# File 'lib/osbourne/test/message.rb', line 12 def id @id ||= SecureRandom.uuid end |
#sns? ⇒ Boolean
22 23 24 |
# File 'lib/osbourne/test/message.rb', line 22 def sns? true end |
#valid? ⇒ Boolean
16 17 18 |
# File 'lib/osbourne/test/message.rb', line 16 def valid? true end |