13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/runfile-tasks/docs/rdoc.rb', line 13
def rdoc(files=nil, options=@@default_rdoc_options)
files or files = Dir['**/*.{rb,md}']
files = "'" + files.join("' '") + "'"
usage "rdoc [-- OPTIONS...]"
help "Generate documentation using the rdoc command line tool. To pass arguments to rdoc, place them after '--'."
action :rdoc do |args|
inopts = args['OPTIONS']
options = inopts unless inopts.empty?
options = options.join(' ')
cmd = "rdoc #{options} #{files}"
puts "g`Running:` p`#{cmd}`".in_color
system cmd
end
end
|