Class: StandupMD::Post::Message
- Inherits:
-
Object
- Object
- StandupMD::Post::Message
- Defined in:
- lib/standup_md/post/message.rb
Overview
A platform-neutral message to send through a posting adapter.
Instance Attribute Summary collapse
-
#adapter ⇒ Symbol
readonly
The adapter name requested by the caller.
-
#channel ⇒ String?
readonly
The destination channel, room, or conversation identifier.
-
#entry ⇒ StandupMD::Entry
readonly
The standup entry being posted.
-
#text ⇒ String
readonly
The rendered message body.
Instance Method Summary collapse
-
#initialize(entry:, text:, channel:, adapter:) ⇒ Message
constructor
Builds a message for a posting adapter.
Constructor Details
#initialize(entry:, text:, channel:, adapter:) ⇒ Message
Builds a message for a posting adapter.
39 40 41 42 43 44 |
# File 'lib/standup_md/post/message.rb', line 39 def initialize(entry:, text:, channel:, adapter:) @entry = entry @text = text.to_s @channel = channel @adapter = adapter.to_sym end |
Instance Attribute Details
#adapter ⇒ Symbol (readonly)
The adapter name requested by the caller.
30 31 32 |
# File 'lib/standup_md/post/message.rb', line 30 def adapter @adapter end |
#channel ⇒ String? (readonly)
The destination channel, room, or conversation identifier.
24 25 26 |
# File 'lib/standup_md/post/message.rb', line 24 def channel @channel end |
#entry ⇒ StandupMD::Entry (readonly)
The standup entry being posted.
12 13 14 |
# File 'lib/standup_md/post/message.rb', line 12 def entry @entry end |
#text ⇒ String (readonly)
The rendered message body.
18 19 20 |
# File 'lib/standup_md/post/message.rb', line 18 def text @text end |