def to_entry(name, participant, options, block)

      raise(
        ArgumentError.new(
          'can only accept strings (classnames) or classes as participant arg')
      ) unless [ String, Class, NilClass ].include?(participant.class)

      klass = (participant || Ruote::BlockParticipant).to_s

      options = options.remap { |(k, v), h|
        h[k.to_s] = case v
          when Symbol then v.to_s
          when Proc then v.to_raw_source
          else v
        end
      }

      extract_blocks(block).each do |meth, code|
        @context.treechecker.block_check(code)
        options[meth] = code
      end

      [
        (name.is_a?(Regexp) ? name : Regexp.new("^#{name}$")).source,
        [ klass, options ]
      ]
    end
def to_entry(name, participant, options, block)

      raise(
        ArgumentError.new(
          'can only accept strings (classnames) or classes as participant arg')
      ) unless [ String, Class, NilClass ].include?(participant.class)

      klass = (participant || Ruote::BlockParticipant).to_s

      options = options.remap { |(k, v), h|
        h[k.to_s] = case v
          when Symbol then v.to_s
          when Proc then v.to_raw_source
          else v
        end
      }

      extract_blocks(block).each do |meth, code|
        @context.treechecker.block_check(code)
        options[meth] = code
      end

      [
        (name.is_a?(Regexp) ? name : Regexp.new("^#{name}$")).source,
        [ klass, options ]
      ]
    end
Vanilla service #initialize.

 Used by #register and by Ruote::ParticipantRegistrationProxy