# File lib/ruote/svc/participant_list.rb, line 342 def extract_blocks(block) return {} unless block source = block.to_raw_source tree = Ruote.parse_ruby(source) multi = tree[0, 3] == [ :iter, [ :call, nil, :proc, [ :arglist ] ], nil ] && tree[3].is_a?(Array) && tree[3].first == :block && tree[3][1..-1].all? { |e| e[0] == :iter && e[2] == nil && e[1][0, 2] == [ :call, nil ] && e[1][3] == [ :arglist ] } if multi bpc = BlockParticipantContext.new bpc.instance_eval(&block) bpc.blocks else { 'on_workitem' => source } end end