Class: Weixin::Message
- Inherits:
-
Object
show all
- Defined in:
- lib/weixin/model.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(hash) ⇒ Message
Returns a new instance of Message.
10
11
12
|
# File 'lib/weixin/model.rb', line 10
def initialize(hash)
@source = OpenStruct.new(hash)
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
14
15
16
|
# File 'lib/weixin/model.rb', line 14
def method_missing(method, *args, &block)
@source.send(method, *args, &block)
end
|
Instance Method Details
#CreateTime ⇒ Object
18
19
20
|
# File 'lib/weixin/model.rb', line 18
def CreateTime
@source.CreateTime.to_i
end
|
#MsgId ⇒ Object
22
23
24
|
# File 'lib/weixin/model.rb', line 22
def MsgId
@source.MsgId.to_i
end
|