1
0
mirror of https://github.com/meineerde/rackstash.git synced 2025-12-19 15:01:12 +00:00

Return the given value on Flows#[]=

This commit is contained in:
Holger Just 2017-09-21 22:27:13 +02:00
parent 14479e97dd
commit 20e3f28273

View File

@ -56,6 +56,7 @@ module Rackstash
def []=(index, flow) def []=(index, flow)
flow = Flow.new(flow) unless flow.is_a?(Flow) flow = Flow.new(flow) unless flow.is_a?(Flow)
@flows[index] = flow @flows[index] = flow
flow
end end
# Calls the given block once for each flow in `self`, passing that flow as # Calls the given block once for each flow in `self`, passing that flow as