Class: Wechat::Message::ArticleBuilder

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeArticleBuilder

Returns a new instance of ArticleBuilder.



23
24
25
# File 'lib/wechat/message.rb', line 23

def initialize 
  @items=Array.new
end

Instance Attribute Details

#itemsObject (readonly)

Returns the value of attribute items.



21
22
23
# File 'lib/wechat/message.rb', line 21

def items
  @items
end

Instance Method Details

#item(title: "title", description: nil, pic_url: nil, url: nil) ⇒ Object



27
28
29
# File 'lib/wechat/message.rb', line 27

def item title: "title", description: nil, pic_url: nil, url: nil
  items << {:Title=> title, :Description=> description, :PicUrl=> pic_url, :Url=> url}
end