Class: MessengerClient::Menu
- Inherits:
-
Object
- Object
- MessengerClient::Menu
- Defined in:
- lib/messenger_client/menu.rb
Instance Method Summary collapse
-
#initialize(buttons) ⇒ Menu
constructor
A new instance of Menu.
- #to_json ⇒ Object
Constructor Details
#initialize(buttons) ⇒ Menu
Returns a new instance of Menu.
3 4 5 6 |
# File 'lib/messenger_client/menu.rb', line 3 def initialize() @text = text @buttons = () end |
Instance Method Details
#to_json ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/messenger_client/menu.rb', line 8 def to_json { setting_type: "call_to_actions", thread_state: "existing_thread", call_to_actions: (@buttons) } end |