README.md in kraps-0.4.0 vs README.md in kraps-0.5.0

- old
+ new

@@ -263,9 +263,22 @@ # ... end end ``` +Please note that every API method accepts a `before` callable: + +```ruby +before_block = proc do + # runs once before the map action in every worker, which can be useful to + # e.g. populate caches etc. +end + +job.map(before: before_block) do |key, value, collector| + # ... +end +``` + ## More Complex Jobs Please note that a job class can return multiple jobs and jobs can build up on each other. Let's assume that we additionally want to calculate a total number of searches made: