Module: RDoc

Defined in:
lib/overloads.rb

Class Method Summary collapse

Class Method Details

.file_no_exit(filename, *args) ⇒ Object

File lib/rdoc/usage.rb, line 98



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/overloads.rb', line 14

def RDoc.file_no_exit(filename,*args)
  content = IO.readlines(filename).join
  markup = SM::SimpleMarkup.new
  flow_convertor = SM::ToFlow.new
  flow = markup.convert(content, 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