Module: WechatClient

Defined in:
lib/wechat_client.rb,
lib/wechat_client/api.rb,
lib/wechat_client/client.rb,
lib/wechat_client/o_auth.rb,
lib/wechat_client/version.rb,
lib/wechat_client/apis/getting.rb,
lib/wechat_client/apis/posting.rb,
lib/wechat_client/cache_store/base_store.rb,
lib/wechat_client/cache_store/redis_store.rb

Defined Under Namespace

Modules: Apis, CacheStore Classes: Api, Client, OAuth, ResponseCodeError, WechatApiNotFoundError

Constant Summary collapse

VERSION =
"0.1.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.clientObject (readonly)

Returns the value of attribute client.



29
30
31
# File 'lib/wechat_client.rb', line 29

def client
  @client
end

.loggerObject (readonly)

Returns the value of attribute logger.



29
30
31
# File 'lib/wechat_client.rb', line 29

def logger
  @logger
end

.optionsObject (readonly)

Returns the value of attribute options.



29
30
31
# File 'lib/wechat_client.rb', line 29

def options
  @options
end

Class Method Details

.cacheObject



36
37
38
39
40
41
# File 'lib/wechat_client.rb', line 36

def self.cache
  if @cache_client && client.options.auto_cache
    klass = "WechatClient::CacheStore::" + @cache_client.class.name + "Store"
    @_cache_ ||= const_get(klass).new(@cache_client)
  end
end