Project

obk

0.0
The project is in a healthy, maintained state
Ruby decorator to throttle object method calls
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Throttle Ruby Method Calls

EO principles respected here DevOps By Rultor.com We recommend RubyMine

rake Test Coverage Gem Version Maintainability Yard Docs Hits-of-Code License

First, install it:

gem install obk

Then, use it like this:

require 'obk'
obj = Obk.new(obj, pause: 500)
obj.foo
# Forced 500ms delay here
obj.bar

There 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 you 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 rake

If it's clean and you don't see any error messages, submit your pull request.