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.



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

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

Instance Attribute Details

#action_urlObject

Returns the value of attribute action_url.



65
66
67
# File 'lib/dingbot/message/action_card.rb', line 65

def action_url
  @action_url
end

#titleObject

Returns the value of attribute title.



65
66
67
# File 'lib/dingbot/message/action_card.rb', line 65

def title
  @title
end

Instance Method Details

#formatObject



72
73
74
75
76
77
# File 'lib/dingbot/message/action_card.rb', line 72

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