Class: DingBot::Message::WholeActionCard
- Inherits:
-
ActionCard
- Object
- Base
- ActionCard
- DingBot::Message::WholeActionCard
- Defined in:
- lib/dingbot/message/action_card.rb
Overview
整体跳转ActionCard类型
Instance Attribute Summary collapse
-
#single_title ⇒ Object
Returns the value of attribute single_title.
-
#single_url ⇒ Object
Returns the value of attribute single_url.
Attributes inherited from ActionCard
#btn_orientation, #hide_avatar, #text, #title
Instance Method Summary collapse
- #body_params ⇒ Object
-
#initialize(title = '', text = '', single_title = '', single_url = '', btn_orientation = '0', hide_avatar = '0') ⇒ WholeActionCard
constructor
A new instance of WholeActionCard.
Methods inherited from ActionCard
Methods inherited from Base
Constructor Details
#initialize(title = '', text = '', single_title = '', single_url = '', btn_orientation = '0', hide_avatar = '0') ⇒ WholeActionCard
Returns a new instance of WholeActionCard.
35 36 37 38 39 |
# File 'lib/dingbot/message/action_card.rb', line 35 def initialize(title='', text='', single_title='', single_url='', btn_orientation='0', hide_avatar='0') super(title, text, btn_orientation, hide_avatar) @single_title = single_title @single_url = single_url end |
Instance Attribute Details
#single_title ⇒ Object
Returns the value of attribute single_title.
33 34 35 |
# File 'lib/dingbot/message/action_card.rb', line 33 def single_title @single_title end |
#single_url ⇒ Object
Returns the value of attribute single_url.
33 34 35 |
# File 'lib/dingbot/message/action_card.rb', line 33 def single_url @single_url end |
Instance Method Details
#body_params ⇒ Object
41 42 43 44 45 46 47 48 49 |
# File 'lib/dingbot/message/action_card.rb', line 41 def body_params action_card = super[:actionCard].merge( { singleTitle: @single_title, singleURL: @single_url } ) super.merge(actionCard: action_card) end |