Class: VKTeams::Button
- Inherits:
-
Object
- Object
- VKTeams::Button
- Defined in:
- lib/vkteamsbot/message.rb
Instance Method Summary collapse
-
#initialize(text, style: 'attention', url: nil, call_back_data: nil) ⇒ Button
constructor
A new instance of Button.
- #to_h ⇒ Object
Constructor Details
#initialize(text, style: 'attention', url: nil, call_back_data: nil) ⇒ Button
Returns a new instance of Button.
22 23 24 25 26 27 28 29 |
# File 'lib/vkteamsbot/message.rb', line 22 def initialize text, style:'attention', url:nil, call_back_data:nil @button = { 'text': text, 'style': style, } @button['url'] = url if url @button['callbackData'] = call_back_data if call_back_data end |
Instance Method Details
#to_h ⇒ Object
31 32 33 |
# File 'lib/vkteamsbot/message.rb', line 31 def to_h @button end |