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(={}) [:formatter] ||= RDoc::RI::Formatter.for('plain') [:use_stdout] ||= !$stdout.tty? [:width] ||= 72 @names = [: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([:formatter], [:width], [:use_stdout]) end |