Throttle Ruby Method Calls
First, install it:
gem install obkThen, use it like this:
require 'obk'
obj = Obk.new(obj, pause: 500)
obj.foo
# Forced 500ms delay here
obj.barThere will be a forced delay of 500 milliseconds between .foo and .bar calls.
Keep in mind that Obk is not thread-safe.
How to contribute
Read these guidelines. Make sure your build is green before you contribute your pull request. You will need to have Ruby 2.3+ and Bundler installed. Then:
bundle update
bundle exec rakeIf it's clean and you don't see any error messages, submit your pull request.