Class: Wechat::Message::Mass
- Defined in:
- app/apis/wechat/message/mass.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#msgtype ⇒ Object
readonly
Returns the value of attribute msgtype.
Instance Method Summary collapse
- #do_send ⇒ Object
-
#initialize(app, msg = {}) ⇒ Mass
constructor
A new instance of Mass.
- #restore ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(app, msg = {}) ⇒ Mass
Returns a new instance of Mass.
4 5 6 7 8 9 |
# File 'app/apis/wechat/message/mass.rb', line 4 def initialize(app, msg = {}) super @send_to = nil @msgtype = @message_hash['msgtype'].to_s restore end |
Instance Attribute Details
#msgtype ⇒ Object (readonly)
Returns the value of attribute msgtype.
2 3 4 |
# File 'app/apis/wechat/message/mass.rb', line 2 def msgtype @msgtype end |
Instance Method Details
#do_send ⇒ Object
11 12 13 |
# File 'app/apis/wechat/message/mass.rb', line 11 def do_send end |
#restore ⇒ Object
15 16 17 18 19 20 |
# File 'app/apis/wechat/message/mass.rb', line 15 def restore case msgtype when 'text', 'markdown' @message_hash[msgtype] = { content: @message_hash.delete('content') } end end |