Method: Wechat::Message.to
- Defined in:
- lib/wechat/message.rb
.to(to_users = '', towxname: nil, send_ignore_reprint: 0) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/wechat/message.rb', line 10 def to(to_users = '', towxname: nil, send_ignore_reprint: 0) if towxname.present? new(ToWxName: towxname, CreateTime: Time.now.to_i) elsif send_ignore_reprint == 1 new(ToUserName: to_users, CreateTime: Time.now.to_i, send_ignore_reprint: send_ignore_reprint) else new(ToUserName: to_users, CreateTime: Time.now.to_i) end end |