Class: MicrosoftTeamsIncomingWebhookRuby::Message
- Inherits:
-
Object
- Object
- MicrosoftTeamsIncomingWebhookRuby::Message
- Defined in:
- lib/microsoft_teams_incoming_webhook_ruby/message.rb
Defined Under Namespace
Modules: Error
Instance Attribute Summary collapse
-
#builder ⇒ Object
readonly
Returns the value of attribute builder.
Instance Method Summary collapse
-
#initialize {|@builder| ... } ⇒ Message
constructor
A new instance of Message.
- #send ⇒ Object
Constructor Details
#initialize {|@builder| ... } ⇒ Message
Returns a new instance of Message.
17 18 19 20 21 |
# File 'lib/microsoft_teams_incoming_webhook_ruby/message.rb', line 17 def initialize(&block) @builder = OpenStruct.new yield @builder validate_builder end |
Instance Attribute Details
#builder ⇒ Object (readonly)
Returns the value of attribute builder.
15 16 17 |
# File 'lib/microsoft_teams_incoming_webhook_ruby/message.rb', line 15 def builder @builder end |
Instance Method Details
#send ⇒ Object
23 24 25 26 27 28 |
# File 'lib/microsoft_teams_incoming_webhook_ruby/message.rb', line 23 def send validate_builder response = send_by_http check_failure_for(response) response end |