builder/extra/tools/ruby-tpm/configure/group_configure_prompt.rb
# Loop over each member-prompt combination to execute &block
# This will exclude the defaults entry in the group
Loop over each member-prompt combination to execute █
This will exclude the defaults entry in the group
Loop over each member - prompt combination to execute █ This will exclude the defaults entry in the group
def each_member_prompt(include_default = false, &block)
    errors = []
    if include_default == true
      members_list = [DEFAULTS] + get_members()
    else
      members_list = get_members()
    end
    members_list.each{
      |member|
      each_prompt{
        |prompt|
        begin
          curr_member = prompt.get_member()
          prompt.set_member(member)
          block.call(member, prompt)
          prompt.set_member(curr_member)
        rescue ConfigurePromptError => cpe  
          prompt.set_member(curr_member)
          errors << cpe
        rescue => e  
          prompt.set_member(curr_member)
          begin
            val = prompt.get_value()
          rescue
            val = ""
          end
          dup_prompt = prompt.dup()
          prepare_prompt(dup_prompt)
          errors << ConfigurePromptError.new(dup_prompt, e.message, val)
        end
      }
    }
    if errors.length > 0
      raise ConfigurePromptErrorSet.new(errors)
    else
      true
    end
  end
def each_member_prompt ( include_default = false , & block ) errors = [ ] if include_default == true members_list = [ DEFAULTS ] + get_members ( ) else members_list = get_members ( ) end members_list . each { | member | each_prompt { | prompt | begin curr_member = prompt . get_member ( ) prompt . set_member ( member ) block . call ( member , prompt ) prompt . set_member ( curr_member ) rescue ConfigurePromptError => cpe prompt . set_member ( curr_member ) errors << cpe rescue => e prompt . set_member ( curr_member ) begin val = prompt . get_value ( ) rescue val = "" end dup_prompt = prompt . dup ( ) prepare_prompt ( dup_prompt ) errors << ConfigurePromptError . new ( dup_prompt , e . message , val ) end } } if errors . length > 0 raise ConfigurePromptErrorSet . new ( errors ) else true end end
Loop over each member-prompt combination to execute &block
This will exclude the defaults entry in the group
Loop over each member - prompt combination to execute &block This will exclude the defaults entry in the group
include_default
block