Class: Wechat::Message::ArticleBuilder
- Inherits:
-
Object
- Object
- Wechat::Message::ArticleBuilder
- Defined in:
- lib/wechat/message.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
readonly
Returns the value of attribute items.
Instance Method Summary collapse
-
#initialize ⇒ ArticleBuilder
constructor
A new instance of ArticleBuilder.
- #item(title: "title", description: nil, pic_url: nil, url: nil) ⇒ Object
Constructor Details
#initialize ⇒ ArticleBuilder
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
#items ⇒ Object (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 |