Sha256: 7c2c323f6dc007325a5b7a51f7a9ef1a1f07de7703fed103d2f3184c0c43cdf9
Contents?: true
Size: 772 Bytes
Versions: 10
Compression:
Stored size: 772 Bytes
Contents
require 'rdoc/usage' module RDoc # Display usage information from RDoc comments in the given file. #-- # Copyright (c) 2001-2003 Dave Thomas. # Released under the same license as Ruby. 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 options = RI::Options.instance if args = ENV["RI"] options.parse(args.split) end formatter = options.formatter.new(options, "") formatter.display_flow(flow) end end
Version data entries
10 entries across 10 versions & 1 rubygems