Sha256: 3d0d05457be93423730601bfdcdcaa31623e79c86c83c5d6e3f6e7a59afb2aaf
Contents?: true
Size: 897 Bytes
Versions: 25
Compression:
Stored size: 897 Bytes
Contents
require 'rdoc/usage' #due to a bug in rdoc, RDoc.usage won't work correctly when run from a gem executable # see http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/211297 # Display usage from the given file def RDoc.usage_from_file(input_file, *args) comment = File.open(input_file) do |file| RDoc.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 options = RI::Options.instance if args = ENV["RI"] options.parse(args.split) end formatter = options.formatter.new(options, "") formatter.display_flow(flow) exit end
Version data entries
25 entries across 25 versions & 2 rubygems