9
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/active_doc/rdoc_generator.rb', line 9
def self.write_rdoc(source_file_path = nil)
files_and_methods = ActiveDoc.documented_methods.sort_by { |x| x.origin_line }.group_by { |x| x.origin_file }
files_and_methods.delete_if { |file| file != source_file_path } if source_file_path
files_and_methods.each do |origin_file, documented_methods|
offset = 0
yield origin_file, documented_methods if block_given?
documented_methods.each do |documented_method|
offset = documented_method.write_rdoc(offset)
end
end
end
|