def rdoc(params)
require 'rdoc/rdoc'
params_desc= {
:root => { :mandatory => false, :type => :string },
:includes => { :mandatory => true, :type => :string_or_array },
:excludes => { :mandatory => false, :type => :string_or_array },
:dotmatch => { :mandatory => false, :type => :boolean, :default => false },
:dest => { :mandatory => true, :type => :string },
:options => { :mandatory => false, :type => :string_or_array }
}
check_parameters(params, params_desc)
root = params[:root]
includes = params[:includes]
excludes = params[:excludes]
dotmatch = params[:dotmatch]
dest = params[:dest]
options = params[:options]
files = filter_files(includes, excludes, root, dotmatch)
command_line = ['-S', '-o', dest]
command_line << options if options
command_line += files
begin
rdoc = RDoc::RDoc.new
rdoc.document(command_line)
rescue
error "Error generating RDoc: #{$!}"
end
end