class MpWeixin::ReplyMessage
Attributes
CreateTime[RW]
xml_convention :camelcase
FromUserName[RW]
xml_convention :camelcase
MsgType[RW]
xml_convention :camelcase
ToUserName[RW]
xml_convention :camelcase
Public Class Methods
new(attributes = {})
click to toggle source
Calls superclass method
ActiveModel::Model::new
# File lib/mp_weixin/models/reply_message.rb, line 19 def initialize(attributes = {}) super @CreateTime ||= Time.now.to_i end
set_nested_attr(nested_attr_name)
click to toggle source
# File lib/mp_weixin/models/reply_message.rb, line 29 def set_nested_attr(nested_attr_name) # define_method(:hi) { puts "Hello World!" } class_eval <<-STR def #{nested_attr_name}=(nested_attr = []) @#{nested_attr_name} = nested_attr.is_a?(#{nested_attr_name}) ? nested_attr : #{nested_attr_name}.new(nested_attr) end STR end
Public Instance Methods
to_xml()
click to toggle source
Calls superclass method
# File lib/mp_weixin/models/reply_message.rb, line 24 def to_xml super.to_xml(:encoding => 'UTF-8', :indent => 0, :save_with => 0) end