Class: SimpleWx::Message
Direct Known Subclasses
SimpleWx::Messages::ImageMessage, SimpleWx::Messages::MusicMessage, SimpleWx::Messages::NewsMessage, SimpleWx::Messages::TextMessage, SimpleWx::Messages::VideoMessage, SimpleWx::Messages::VoiceMessage, Template
Instance Attribute Summary collapse
-
#json ⇒ Object
Returns the value of attribute json.
-
#openid ⇒ Object
Returns the value of attribute openid.
-
#xml ⇒ Object
Returns the value of attribute xml.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(options) ⇒ Message
constructor
A new instance of Message.
Methods inherited from Base
Constructor Details
#initialize(options) ⇒ Message
Returns a new instance of Message.
4 5 6 7 8 9 10 |
# File 'lib/simple_wx/message.rb', line 4 def initialize @openid = [:openid] @access_token = [:access_token] || AccessToken.access_token @custom_msg_url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=#{@access_token}" @json = {} @xml = {} end |
Instance Attribute Details
#json ⇒ Object
Returns the value of attribute json.
3 4 5 |
# File 'lib/simple_wx/message.rb', line 3 def json @json end |
#openid ⇒ Object
Returns the value of attribute openid.
3 4 5 |
# File 'lib/simple_wx/message.rb', line 3 def openid @openid end |
#xml ⇒ Object
Returns the value of attribute xml.
3 4 5 |
# File 'lib/simple_wx/message.rb', line 3 def xml @xml end |