Module: RDoc
- Defined in:
- lib/ruby-vpi/rdoc.rb
Class Method Summary collapse
-
.usage_from_file(input_file, *args) ⇒ Object
Display usage information from RDoc comments in the given file.
Class Method Details
.usage_from_file(input_file, *args) ⇒ Object
Display usage information from RDoc comments in the given file. – Copyright © 2001-2003 Dave Thomas. Released under the same license as Ruby.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/ruby-vpi/rdoc.rb', line 8 def RDoc.usage_from_file input_file, *args comment = File.open(input_file) do |file| find_comment(file) end comment = comment.gsub(/^\s*#/, '') markup = SM::SimpleMarkup.new flow_convertor = SM::ToFlow.new flow = markup.convert(comment, flow_convertor) format = "plain" unless args.empty? flow = extract_sections(flow, args) end = RI::Options.instance if args = ENV["RI"] .parse(args.split) end formatter = .formatter.new(, "") formatter.display_flow(flow) end |