lib/ruote/svc/participant_list.rb
# Given a participant name, returns participant details.
#
# Returns nil if there is no participant registered that covers the given
# participant name.
#
Given a participant name, returns participant details.
Returns nil if there is no participant registered that covers the given
participant name.
Given a participant name returns participant details . Returns nil if there is no participant registered that covers the given participant name .
def lookup_info(pname, workitem)
      return nil unless pname
      wi = workitem ?
        Ruote::Workitem.new(workitem.merge('participant_name' => pname)) :
        nil
      get_list['list'].each do |regex, pinfo|
        next unless pname.match(regex)
        return pinfo if workitem.nil?
        pa = instantiate(pinfo, :if_respond_to? => :accept?)
        return pinfo if pa.nil?
        return pinfo if Ruote.participant_send(pa, :accept?, 'workitem' => wi)
      end
      nil
    end
def lookup_info ( pname , workitem ) return nil unless pname wi = workitem ? Ruote :: Workitem . new ( workitem . merge ( 'participant_name' => pname ) ) : nil get_list [ 'list' ] . each do | regex , pinfo | next unless pname . match ( regex ) return pinfo if workitem . nil? pa = instantiate ( pinfo , :if_respond_to? => :accept? ) return pinfo if pa . nil? return pinfo if Ruote . participant_send ( pa , :accept? , 'workitem' => wi ) end nil end
Given a participant name, returns participant details.
Given a participant name returns participant details .
# nothing found...
pname
workitem