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:
parent
0782f31d45
commit
1b2dd09000
@ -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.
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user