Module: Ikibana::Consumer::ClassMethods
- Defined in:
- lib/ikibana/consumer.rb
Instance Method Summary collapse
Instance Method Details
#at_most_once ⇒ Object
12 13 14 |
# File 'lib/ikibana/consumer.rb', line 12 def at_most_once cache.write("#{self}_locked", true) end |
#cache ⇒ Object
25 26 27 |
# File 'lib/ikibana/consumer.rb', line 25 def cache Ikibana::Config.instance.cache end |
#destructor ⇒ Object
21 22 23 |
# File 'lib/ikibana/consumer.rb', line 21 def destructor(...) cache.write("#{self}_locked", false) end |
#sync ⇒ Object
16 17 18 19 |
# File 'lib/ikibana/consumer.rb', line 16 def sync(...) cache.write("#{self}_locked", false) cache.write("#{self}_sync", true) end |