Class: DingBot::Message::ActionCard
- Defined in:
- lib/dingbot/message/action_card.rb
Overview
ActionCard基类
Direct Known Subclasses
Instance Attribute Summary collapse
-
#btn_orientation ⇒ Object
Returns the value of attribute btn_orientation.
-
#hide_avatar ⇒ Object
Returns the value of attribute hide_avatar.
-
#text ⇒ Object
Returns the value of attribute text.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
- #body_params ⇒ Object
-
#initialize(title = '', text = '', btn_orientation = '0', hide_avatar = '0') ⇒ ActionCard
constructor
A new instance of ActionCard.
- #msg_type ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(title = '', text = '', btn_orientation = '0', hide_avatar = '0') ⇒ ActionCard
Returns a new instance of ActionCard.
8 9 10 11 12 13 |
# File 'lib/dingbot/message/action_card.rb', line 8 def initialize(title='', text='', btn_orientation='0', hide_avatar='0') @title = title @text = text @btn_orientation = btn_orientation @hide_avatar = hide_avatar end |
Instance Attribute Details
#btn_orientation ⇒ Object
Returns the value of attribute btn_orientation.
6 7 8 |
# File 'lib/dingbot/message/action_card.rb', line 6 def btn_orientation @btn_orientation end |
#hide_avatar ⇒ Object
Returns the value of attribute hide_avatar.
6 7 8 |
# File 'lib/dingbot/message/action_card.rb', line 6 def hide_avatar @hide_avatar end |
#text ⇒ Object
Returns the value of attribute text.
6 7 8 |
# File 'lib/dingbot/message/action_card.rb', line 6 def text @text end |
#title ⇒ Object
Returns the value of attribute title.
6 7 8 |
# File 'lib/dingbot/message/action_card.rb', line 6 def title @title end |
Instance Method Details
#body_params ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/dingbot/message/action_card.rb', line 19 def body_params super.merge( actionCard: { title: @title, text: @text, hideAvatar: @hide_avatar, btnOrientation: @btn_orientation, } ) end |
#msg_type ⇒ Object
15 16 17 |
# File 'lib/dingbot/message/action_card.rb', line 15 def msg_type TYPE::ACTION_CARD end |