Class: Slack::BlockKit::CompositionObjects::ConfirmationDialog
- Inherits:
-
Object
- Object
- Slack::BlockKit::CompositionObjects::ConfirmationDialog
- Defined in:
- lib/slack/block_kit/composition_objects/confirmation_dialog.rb
Instance Attribute Summary collapse
-
#confirm ⇒ Object
Returns the value of attribute confirm.
-
#deny ⇒ Object
Returns the value of attribute deny.
-
#text ⇒ Object
Returns the value of attribute text.
-
#title ⇒ Object
Returns the value of attribute title.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#confirm ⇒ Object
Returns the value of attribute confirm.
8 9 10 |
# File 'lib/slack/block_kit/composition_objects/confirmation_dialog.rb', line 8 def confirm @confirm end |
#deny ⇒ Object
Returns the value of attribute deny.
8 9 10 |
# File 'lib/slack/block_kit/composition_objects/confirmation_dialog.rb', line 8 def deny @deny end |
#text ⇒ Object
Returns the value of attribute text.
8 9 10 |
# File 'lib/slack/block_kit/composition_objects/confirmation_dialog.rb', line 8 def text @text end |
#title ⇒ Object
Returns the value of attribute title.
8 9 10 |
# File 'lib/slack/block_kit/composition_objects/confirmation_dialog.rb', line 8 def title @title end |
Class Method Details
.[](hash) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/slack/block_kit/composition_objects/confirmation_dialog.rb', line 10 def self.[](hash) new.tap do |object| object.title = hash.fetch(:title) object.text = hash.fetch(:text) object.confirm = hash.fetch(:confirm) object.deny = hash.fetch(:deny) end end |
Instance Method Details
#to_h ⇒ Object
50 51 52 53 54 55 |
# File 'lib/slack/block_kit/composition_objects/confirmation_dialog.rb', line 50 def to_h { title: title.to_h, text: text.to_h, confirm: confirm.to_h, deny: deny.to_h }.compact end |