Class: DingBot::Message::ActionBtn

Inherits:
Object
  • Object
show all
Defined in:
lib/dingbot/message/action_card.rb

Overview

跳转按钮

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title = '', action_url = '') ⇒ ActionBtn

Returns a new instance of ActionBtn.



71
72
73
74
# File 'lib/dingbot/message/action_card.rb', line 71

def initialize(title='', action_url='')
  @title = title
  @action_url = action_url
end

Instance Attribute Details

#action_urlObject

Returns the value of attribute action_url.



69
70
71
# File 'lib/dingbot/message/action_card.rb', line 69

def action_url
  @action_url
end

#titleObject

Returns the value of attribute title.



69
70
71
# File 'lib/dingbot/message/action_card.rb', line 69

def title
  @title
end

Instance Method Details

#formatObject



76
77
78
79
80
81
# File 'lib/dingbot/message/action_card.rb', line 76

def format
  {
      title: @title,
      actionURL: @action_url
  }
end