Class: DingBot::Message::FeedCardLink

Inherits:
Object
  • Object
show all
Defined in:
lib/dingbot/message/feed_card.rb

Overview

FeedCard跳转链接

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title = '', pic_url = '', message_url = '') ⇒ FeedCardLink

Returns a new instance of FeedCardLink.



27
28
29
30
31
# File 'lib/dingbot/message/feed_card.rb', line 27

def initialize(title='', pic_url='', message_url='')
  @title = title
  @pic_url = pic_url
  @message_url = message_url
end

Instance Attribute Details

#message_urlObject

Returns the value of attribute message_url.



25
26
27
# File 'lib/dingbot/message/feed_card.rb', line 25

def message_url
  @message_url
end

#pic_urlObject

Returns the value of attribute pic_url.



25
26
27
# File 'lib/dingbot/message/feed_card.rb', line 25

def pic_url
  @pic_url
end

#titleObject

Returns the value of attribute title.



25
26
27
# File 'lib/dingbot/message/feed_card.rb', line 25

def title
  @title
end

Instance Method Details

#formatObject



33
34
35
36
37
38
39
# File 'lib/dingbot/message/feed_card.rb', line 33

def format
  {
      title: @title,
      messageURL: @message_url,
      picURL: @pic_url
  }
end