Class: DingBot::Message::FeedCard
- Defined in:
- lib/dingbot/message/feed_card.rb
Overview
FeedCard类型
Instance Attribute Summary collapse
-
#links ⇒ Object
Returns the value of attribute links.
Instance Method Summary collapse
- #body_params ⇒ Object
-
#initialize(links = []) ⇒ FeedCard
constructor
A new instance of FeedCard.
- #msg_type ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(links = []) ⇒ FeedCard
Returns a new instance of FeedCard.
8 9 10 |
# File 'lib/dingbot/message/feed_card.rb', line 8 def initialize(links=[]) @links = links end |
Instance Attribute Details
#links ⇒ Object
Returns the value of attribute links.
6 7 8 |
# File 'lib/dingbot/message/feed_card.rb', line 6 def links @links end |
Instance Method Details
#body_params ⇒ Object
16 17 18 19 20 |
# File 'lib/dingbot/message/feed_card.rb', line 16 def body_params super.merge(feedCard: { links: @links.map {|link| link.format} }) end |