Class: ThirdPartyWxa::Token::Store

Inherits:
Object
  • Object
show all
Defined in:
lib/third_party_wxa/token/store.rb

Direct Known Subclasses

LocalStore, RedisStore

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(plugin) ⇒ Store

Returns a new instance of Store.



7
8
9
# File 'lib/third_party_wxa/token/store.rb', line 7

def initialize plugin
	@plugin = plugin
end

Instance Attribute Details

#pluginObject

Returns the value of attribute plugin.



5
6
7
# File 'lib/third_party_wxa/token/store.rb', line 5

def plugin
  @plugin
end

Class Method Details

.init_with(plugin) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/third_party_wxa/token/store.rb', line 11

def self.init_with plugin
	if ThirdPartyWxa.wx_redis.nil?
		LocalStore.new plugin
	else
		RedisStore.new plugin
	end
end

Instance Method Details

#set_tokenObject



22
23
# File 'lib/third_party_wxa/token/store.rb', line 22

def set_token
end

#valid?Boolean

Returns:

  • (Boolean)


19
20
# File 'lib/third_party_wxa/token/store.rb', line 19

def valid?
end

#wx_redisObject



25
26
27
# File 'lib/third_party_wxa/token/store.rb', line 25

def wx_redis
	ThirdPartyWxa.wx_redis
end