def write_properties
if (empty_string? doc_path) then
raise "not allowed a empty #{@src.path_label}."
end
document_list = @src.document_list
document_list[@doc_pos] = Hash.new if (@doc_pos >= document_list.length)
document_list[@doc_pos][@src.doc_tag] = @doc_type
document_list[@doc_pos][@src.path_tag] = @doc_path
case (@doc_mask_type_selected)
when 'nil'
document_list[@doc_pos][@src.mask_tag] = nil
when 'regexp'
document_list[@doc_pos][@src.mask_tag] = Regexp.compile("(#{@doc_mask})(/|$)")
when 'string'
document_list[@doc_pos][@src.mask_tag] = @doc_mask || ''
else
raise "unknown mask selection: #{@doc_mask_type_selected.inspect}"
end
if (! (empty_string? @virtual_host, true)) then
if (@virtual_host =~ /:\d+$/) then
raise "no use of port number: #{@virtual_host.inspect}"
end
document_list[@doc_pos]['virtual_host'] = @virtual_host
else
document_list[@doc_pos]['virtual_host'] = nil
end
document_list[@doc_pos]['comment'] = @comment
document_list[@doc_pos]['arguments'] = @doc_args.map{ |arg_info|
(arg_info[:clear]) ? nil : arg_info[:value]
}
@src.write_document_list
nil
end