Method: ActionController::Base.wechat_responder
- Defined in:
- lib/wechat_public.rb
.wechat_responder(opts = {}) ⇒ Object
48 49 50 51 52 53 54 55 56 57 |
# File 'lib/wechat_public.rb', line 48 def self.wechat_responder opts={} self.send(:include, WechatPublic::Responder) if (opts.empty?) self.wechat = WechatPublic.api self.token = WechatPublic.config.token else self.wechat = WechatPublic::Api.new(opts[:appid], opts[:secret], opts[:access_token]) self.token = opts[:token] end end |