class Stalking::Handlers
Attributes
after_handlers[R]
before_handlers[R]
error_handlers[R]
job_handlers[R]
Public Class Methods
new()
click to toggle source
# File lib/stalking/handlers.rb, line 6 def initialize @before_handlers = [] @after_handlers = [] @error_handlers = [] @job_handlers = {} end
Public Instance Methods
after(&block)
click to toggle source
# File lib/stalking/handlers.rb, line 18 def after(&block) @after_handlers.push block end
before(&block)
click to toggle source
# File lib/stalking/handlers.rb, line 14 def before(&block) @before_handlers.push block end
error(&block)
click to toggle source
# File lib/stalking/handlers.rb, line 22 def error(&block) @error_handlers.push block end
job(name, &block)
click to toggle source
# File lib/stalking/handlers.rb, line 26 def job(name, &block) @job_handlers[name] = block end