Class: DingBot::Message::IndependentActionCard
- Inherits:
-
ActionCard
- Object
- Base
- ActionCard
- DingBot::Message::IndependentActionCard
- Defined in:
- lib/dingbot/message/action_card.rb
Overview
独立跳转ActionCard类型
Instance Attribute Summary collapse
-
#buttons ⇒ Object
Returns the value of attribute buttons.
Attributes inherited from ActionCard
#at_mobiles, #btn_orientation, #text, #title
Instance Method Summary collapse
- #body_params ⇒ Object
-
#initialize(title = '', text = '', buttons = [], at_mobiles = [], btn_orientation = '0') ⇒ IndependentActionCard
constructor
A new instance of IndependentActionCard.
Methods inherited from ActionCard
Methods inherited from Base
Constructor Details
#initialize(title = '', text = '', buttons = [], at_mobiles = [], btn_orientation = '0') ⇒ IndependentActionCard
Returns a new instance of IndependentActionCard.
80 81 82 83 |
# File 'lib/dingbot/message/action_card.rb', line 80 def initialize(title='', text='', =[], at_mobiles=[], btn_orientation='0') super(title, text, btn_orientation, at_mobiles) @buttons = end |
Instance Attribute Details
#buttons ⇒ Object
Returns the value of attribute buttons.
78 79 80 |
# File 'lib/dingbot/message/action_card.rb', line 78 def @buttons end |
Instance Method Details
#body_params ⇒ Object
85 86 87 88 |
# File 'lib/dingbot/message/action_card.rb', line 85 def body_params action_card = super[:actionCard].merge(btns: @buttons.map {|btn| btn.format}) super.merge(actionCard: action_card) end |