Method: RDoc::RI::Driver#initialize

Defined in:
lib/rdoc/ri/driver.rb

#initialize(options = {}) ⇒ Driver

Returns a new instance of Driver.



203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# File 'lib/rdoc/ri/driver.rb', line 203

def initialize(options={})
  options[:formatter] ||= RDoc::RI::Formatter.for('plain')
  options[:use_stdout] ||= !$stdout.tty?
  options[:width] ||= 72
  @names = options[:names]

  @class_cache_name = 'classes'
  @all_dirs = RDoc::RI::Paths.path(true, true, true, true)
  @homepath = RDoc::RI::Paths.raw_path(false, false, true, false).first
  @homepath = @homepath.sub(/\.rdoc/, '.ri')
  @sys_dirs = RDoc::RI::Paths.raw_path(true, false, false, false)

  FileUtils.mkdir_p cache_file_path unless File.directory? cache_file_path

  @class_cache = nil

  @display = RDoc::RI::DefaultDisplay.new(options[:formatter],
                                          options[:width],
                                          options[:use_stdout])
end