Method: RDoc::Generator::SHtml#initialize

Defined in:
lib/sdoc/generator/shtml.rb

#initialize(options) ⇒ SHtml

Returns a new instance of SHtml.

Raises:

  • (RDoc::Error)


71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/sdoc/generator/shtml.rb', line 71

def initialize(options)
  @options = options
  @options.diagram = false
  @github_url_cache = {}

  template = @options.template || 'direct'

  templ_dir = self.class.template_dir template

  raise RDoc::Error, "could not find template #{template.inspect}" unless
  templ_dir

  @template_dir = Pathname.new File.expand_path(templ_dir)
  @basedir = Pathname.pwd.expand_path
end