Module: Spikard::Background
- Defined in:
- lib/spikard/background.rb
Overview
Background job helpers.
Class Method Summary collapse
-
.run(&block) ⇒ Object
Schedule a block to run after the response has been returned.
Class Method Details
.run(&block) ⇒ Object
Schedule a block to run after the response has been returned.
21 22 23 24 25 |
# File 'lib/spikard/background.rb', line 21 def run(&block) raise ArgumentError, 'background.run requires a block' unless block @queue << block end |