Class: DingBot::Message::Text
Overview
text类型 {
"msgtype": "text",
"text": {
"content": "我就是我, 是不一样的烟火"
},
"at": {
"atMobiles": [
"156xxxx8827",
"189xxxx8325"
],
"isAtAll": false
}
}
Instance Attribute Summary collapse
-
#at_mobiles ⇒ Object
Returns the value of attribute at_mobiles.
-
#content ⇒ Object
Returns the value of attribute content.
-
#is_at_all ⇒ Object
Returns the value of attribute is_at_all.
Instance Method Summary collapse
- #body_params ⇒ Object
-
#initialize(content = '', at_mobiles = [], is_at_all = false) ⇒ Text
constructor
A new instance of Text.
- #msg_type ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(content = '', at_mobiles = [], is_at_all = false) ⇒ Text
Returns a new instance of Text.
21 22 23 24 25 |
# File 'lib/dingbot/message/text.rb', line 21 def initialize(content='', at_mobiles=[], is_at_all=false) @content = content @at_mobiles = at_mobiles @is_at_all = is_at_all end |
Instance Attribute Details
#at_mobiles ⇒ Object
Returns the value of attribute at_mobiles.
19 20 21 |
# File 'lib/dingbot/message/text.rb', line 19 def at_mobiles @at_mobiles end |
#content ⇒ Object
Returns the value of attribute content.
19 20 21 |
# File 'lib/dingbot/message/text.rb', line 19 def content @content end |
#is_at_all ⇒ Object
Returns the value of attribute is_at_all.
19 20 21 |
# File 'lib/dingbot/message/text.rb', line 19 def is_at_all @is_at_all end |
Instance Method Details
#body_params ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/dingbot/message/text.rb', line 31 def body_params super.merge( { text: { content: @content }, at: { atMobiles: @at_mobiles, isAtAll: @is_at_all } } ) end |