Class: ActionController::Base
- Inherits:
-
Object
- Object
- ActionController::Base
- Defined in:
- lib/wechat_public.rb
Class Method Summary collapse
Class Method Details
.wechat_responder(opts = {}) ⇒ Object
93 94 95 96 97 98 99 100 101 102 |
# File 'lib/wechat_public.rb', line 93 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 |