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.



95
96
97
98
# File 'lib/dingbot/message/action_card.rb', line 95

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

Instance Attribute Details

#action_urlObject

Returns the value of attribute action_url.



93
94
95
# File 'lib/dingbot/message/action_card.rb', line 93

def action_url
  @action_url
end

#titleObject

Returns the value of attribute title.



93
94
95
# File 'lib/dingbot/message/action_card.rb', line 93

def title
  @title
end

Instance Method Details

#formatObject



100
101
102
103
104
105
# File 'lib/dingbot/message/action_card.rb', line 100

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