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

Add FilterChain#push as an alias to FilterChain#<<

This commit is contained in:
Holger Just 2017-12-20 21:39:55 +01:00
parent 0782f31d45
commit 1b2dd09000
2 changed files with 6 additions and 0 deletions

View File

@ -94,6 +94,7 @@ module Rackstash
self
end
alias << append
alias push append
# Filter the given event by calling each defined filter with it. Each filter
# will be called with the current event and can manipulate it in any way.

View File

@ -152,6 +152,11 @@ describe Rackstash::FilterChain do
expect(filter_chain << filter).to equal filter_chain
expect(filter_chain[0]).to eql filter
end
it 'can use #push alias' do
expect(filter_chain.push(filter)).to equal filter_chain
expect(filter_chain[0]).to eql filter
end
end
describe '#call' do