1
0
mirror of https://github.com/meineerde/rackstash.git synced 2026-01-31 17:27:13 +00:00

Add documentation about Filter#register and Encoder#register

This commit is contained in:
Holger Just 2017-12-21 01:42:01 +01:00
parent 9ed350cb8d
commit e5c83d9ac5
2 changed files with 8 additions and 0 deletions

View File

@ -26,6 +26,10 @@ module Rackstash
# deal with events on their own.
module Encoder
class << self
# Register an encoder with one or more given names. These names can then
# be used in {.build} to fetch the registered class and build a new
# encoder object for it.
#
# @param encoder_class [Class] a class from which a new encoder can be
# created. Filter objects must respond to `encode` and accept an event
# hash.

View File

@ -24,6 +24,10 @@ module Rackstash
# class inside this module.
module Filter
class << self
# Register a filter with one or more given names. These names can then be
# used in {.build} to fetch the registered class and build a new filter
# object for it.
#
# @param filter_class [Class] a class from which a new filter can be
# created. Filter objects must respond to `call` and accept an event
# hash.