class ICQ::Button

Public Class Methods

new(text, style:'attention', url:nil, call_back_data:nil) click to toggle source
# File lib/icqbot/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

Public Instance Methods

to_h() click to toggle source
# File lib/icqbot/message.rb, line 31
def to_h
  @button
end