Class: WeChat::Bot::CachedList
- Inherits:
-
Object
- Object
- WeChat::Bot::CachedList
- Includes:
- Enumerable
- Defined in:
- lib/wechat/bot/cached_list.rb
Direct Known Subclasses
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(bot) ⇒ CachedList
constructor
A new instance of CachedList.
Constructor Details
#initialize(bot) ⇒ CachedList
Returns a new instance of CachedList.
5 6 7 8 9 |
# File 'lib/wechat/bot/cached_list.rb', line 5 def initialize(bot) @bot = bot @cache = {} @mutex = Mutex.new end |
Instance Method Details
#each(&block) ⇒ Object
11 12 13 |
# File 'lib/wechat/bot/cached_list.rb', line 11 def each(&block) @cache.each_value(&block) end |