Class: EasyWeixin::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/easy_weixin/model.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMessage

Returns a new instance of Message.



9
10
11
12
13
# File 'lib/easy_weixin/model.rb', line 9

def initialize
	@ToUserName = ToUserName
	@FromUserName = FromUserName
	@CreateTime = CreateTime
end

Instance Attribute Details

#CreateTimeObject

Returns the value of attribute CreateTime.



7
8
9
# File 'lib/easy_weixin/model.rb', line 7

def CreateTime
  @CreateTime
end

#FromUserNameObject

Returns the value of attribute FromUserName.



7
8
9
# File 'lib/easy_weixin/model.rb', line 7

def FromUserName
  @FromUserName
end

#ToUserNameObject

Returns the value of attribute ToUserName.



7
8
9
# File 'lib/easy_weixin/model.rb', line 7

def ToUserName
  @ToUserName
end

Class Method Details

.factory(xml) ⇒ Object



15
16
17
18
# File 'lib/easy_weixin/model.rb', line 15

def self.factory(xml)
	hash = MultiXml.parse(xml)['xml']
	source = OpenStruct.new(hash)
end