Hello Amedeo,
no, but would something like (
https://gist.github.com/3040131) this help?
---8<---
require 'pp'
require 'ruote'
pdef = Ruote.define do
alice
concurrence do
bob
charly
end
participant :ref => 'doug'
end
dboard = Ruote::Dashboard.new(Ruote::HashStorage.new)
dboard.register do
alice Ruote::NoOpParticipant
participant /.+/, Ruote::StorageParticipant
end
def find_participants(dboard, tree, accu=[])
if tree[0] == 'participant'
accu << [ tree[1]['ref'], dboard.participant(tree[1]['ref']).class ]
elsif exp_class = dboard.context.expmap.expression_class(tree[0])
# do nothing
elsif pa = dboard.participant(tree[0])
accu << [ tree[0], pa.class ]
end
tree[2].each do |t|
find_participants(dboard, t, accu)
end
accu
end
pp find_participants(dboard, pdef)
--->8---
Best regards,
--
John Mettraux -
http://lambda.io/jmettraux