Class: SimpleWx::Message

Inherits:
Base
  • Object
show all
Defined in:
lib/simple_wx/message.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#error, #raise_flag

Instance Method Summary collapse

Methods inherited from Base

method_missing

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 options
  @openid = options[:openid]
  @access_token = options[: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

#jsonObject

Returns the value of attribute json.



3
4
5
# File 'lib/simple_wx/message.rb', line 3

def json
  @json
end

#openidObject

Returns the value of attribute openid.



3
4
5
# File 'lib/simple_wx/message.rb', line 3

def openid
  @openid
end

#xmlObject

Returns the value of attribute xml.



3
4
5
# File 'lib/simple_wx/message.rb', line 3

def xml
  @xml
end