summaryrefslogtreecommitdiffhomepage
path: root/doc/language/mrbdoc/mrbdoc.rb
diff options
context:
space:
mode:
Diffstat (limited to 'doc/language/mrbdoc/mrbdoc.rb')
-rwxr-xr-xdoc/language/mrbdoc/mrbdoc.rb18
1 files changed, 17 insertions, 1 deletions
diff --git a/doc/language/mrbdoc/mrbdoc.rb b/doc/language/mrbdoc/mrbdoc.rb
index cd8ae3833..cafdf112a 100755
--- a/doc/language/mrbdoc/mrbdoc.rb
+++ b/doc/language/mrbdoc/mrbdoc.rb
@@ -7,16 +7,32 @@ require 'mrbdoc_docu'
MRUBY_ROOT = ARGV[0]
DOC_ROOT = ARGV[1]
+_WRITE_LINE_NO = ARGV[2]
+STDOUT.sync = true
raise ArgumentError.new 'mruby root missing!' if MRUBY_ROOT.nil?
raise ArgumentError.new 'doc root missing!' if DOC_ROOT.nil?
+if _WRITE_LINE_NO.nil?
+ WRITE_LINE_NO = true
+else
+ case _WRITE_LINE_NO
+ when 'true'
+ WRITE_LINE_NO = true
+ when 'false'
+ WRITE_LINE_NO = false
+ else
+ raise ArgumentError.new 'Line no parameter has to be false or true!'
+ end
+end
+
mrbdoc = MRBDoc.new
mrbdoc.analyze_code MRUBY_ROOT do |progress|
puts progress
end
-mrbdoc.write_documentation DOC_ROOT do |progress|
+cfg = {:print_line_no => WRITE_LINE_NO}
+mrbdoc.write_documentation DOC_ROOT, cfg do |progress|
puts progress
end