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:
parent
9ed350cb8d
commit
e5c83d9ac5
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user