Class: Generators::AllReferences

Inherits:
Object
  • Object
show all
Defined in:
lib/rdoc/generators/html_generator.rb

Overview

Build a hash of all items that can be cross-referenced. This is used when we output required and included names: if the names appear in this hash, we can generate an html cross reference to the appropriate description. We also use this when parsing comment blocks: any decorated words matching an entry in this list are hyperlinked.

Constant Summary collapse

@@refs =
{}

Class Method Summary collapse

Class Method Details

.[](name) ⇒ Object



73
74
75
# File 'lib/rdoc/generators/html_generator.rb', line 73

def AllReferences.[](name)
  @@refs[name]
end

.add(name, html_class) ⇒ Object



69
70
71
# File 'lib/rdoc/generators/html_generator.rb', line 69

def AllReferences.add(name, html_class)
  @@refs[name] = html_class
end

.keysObject



77
78
79
# File 'lib/rdoc/generators/html_generator.rb', line 77

def AllReferences.keys
  @@refs.keys
end

.resetObject



65
66
67
# File 'lib/rdoc/generators/html_generator.rb', line 65

def AllReferences::reset
  @@refs = {}
end