Class: RDoc::Generator::Markdown

Inherits:
Object
  • Object
show all
Defined in:
lib/rdoc/generator/markdown.rb

Constant Summary collapse

TEMPLATE_DIR =

Defines a constant for directory where templates could be found

File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "templates"))

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(store, options) ⇒ Markdown

Initializer method for Rdoc::Generator::Markdown



50
51
52
53
54
55
56
57
# File 'lib/rdoc/generator/markdown.rb', line 50

def initialize(store, options)
  @store = store
  @options = options

  @base_dir = Pathname.pwd.expand_path

  @classes = nil
end

Instance Attribute Details

#base_dirObject (readonly)

The path to generate files into, combined with --op from the options for a full path.



28
29
30
# File 'lib/rdoc/generator/markdown.rb', line 28

def base_dir
  @base_dir
end

#classesObject (readonly)

Classes and modules to be used by this generator, not necessarily displayed.



34
35
36
# File 'lib/rdoc/generator/markdown.rb', line 34

def classes
  @classes
end

#storeObject (readonly)

The RDoc::Store that is the source of the generated content



22
23
24
# File 'lib/rdoc/generator/markdown.rb', line 22

def store
  @store
end

Instance Method Details

#class_dirObject Also known as: file_dir

Directory where generated class HTML files live relative to the output dir.



40
41
42
# File 'lib/rdoc/generator/markdown.rb', line 40

def class_dir
  nil
end

#generateObject

Generates markdown files and search index file



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/rdoc/generator/markdown.rb', line 62

def generate
  # TODO: Make sure to set --markup parameter to 'markdown'.

  debug("Setting things up #{@output_dir}")

  setup

  debug("Generate documentation in #{@output_dir}")

  emit_classfiles

  debug("Generate search index in #{output_dir}/index.db")

  emit_sqlite
end