Class: ThirdPartyWxa::Token::Store
- Inherits:
-
Object
- Object
- ThirdPartyWxa::Token::Store
- Defined in:
- lib/third_party_wxa/token/store.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#plugin ⇒ Object
Returns the value of attribute plugin.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(plugin) ⇒ Store
constructor
A new instance of Store.
- #set_token ⇒ Object
- #valid? ⇒ Boolean
- #wx_redis ⇒ Object
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
#plugin ⇒ Object
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_token ⇒ Object
22 23 |
# File 'lib/third_party_wxa/token/store.rb', line 22 def set_token end |
#valid? ⇒ Boolean
19 20 |
# File 'lib/third_party_wxa/token/store.rb', line 19 def valid? end |
#wx_redis ⇒ Object
25 26 27 |
# File 'lib/third_party_wxa/token/store.rb', line 25 def wx_redis ThirdPartyWxa.wx_redis end |