From ad07d41bd1b42fe7d23e04361839f511c5f9cd7f Mon Sep 17 00:00:00 2001 From: Daniel Bovensiepen Date: Sun, 23 Jun 2013 18:51:58 +0800 Subject: Improve generator --- doc/language/mrbdoc/lib/mrbdoc_docu.rb | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'doc/language/mrbdoc/lib/mrbdoc_docu.rb') diff --git a/doc/language/mrbdoc/lib/mrbdoc_docu.rb b/doc/language/mrbdoc/lib/mrbdoc_docu.rb index 05aa785ab..116228927 100644 --- a/doc/language/mrbdoc/lib/mrbdoc_docu.rb +++ b/doc/language/mrbdoc/lib/mrbdoc_docu.rb @@ -1,21 +1,16 @@ class MRBDoc - DOC_DIR = 'language' - def write_documentation dir, &block - block.call "MRBDOC\tStart Building Documentation to #{doc_dir(dir)}" + block.call "MRBDOC\twrite to #{File.expand_path(dir)}" write(dir) do |progress| block.call progress end - - block.call "MRBDOC\tFinish Building Documentation" end private def write dir - # io = STDOUT - File.open(File.expand_path('Core_Classes.md', dir), 'w+') do |io| + File.open(File.expand_path('Core.md', dir), 'w+') do |io| print_core_classes(io) print_core_modules(io) end @@ -44,14 +39,16 @@ class MRBDoc file = find_c_file_by_class(name) file = file.split("#{@dir}/")[1] iso = hsh[:data][:iso] - iso = 'n/a' if iso.nil? + iso = 'n/a' if iso.nil? or iso == '' + mixins = hsh[:data][:include].join(', ') unless hsh[:data][:include].nil? + mixins = 'n/a' if mixins.nil? or mixins == '' io.puts <