11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/cloudrail_si/servicecode/commands/stream/MakeJoinedStream.rb', line 11
def execute(environment, parameters)
Helper.assert(parameters.length >= 3 &&
Helper.is_var_address(parameters[0]))
result_var = parameters[0]
source = Helper.resolve(environment, parameters[1])
Helper.assert(Helper.is_stream(source))
stream_stack = []
(0..parameters.length - 1).each do |i|
stream_1 = Helper.resolve(environment, parameters[i])
Helper.assert(Helper.is_stream(stream_1))
stream_stack.push(stream_1)
end
result = join_streams(stream_stack)
environment.set_variable(result_var, result)
end
|