Class: Autodoc::Documents
- Inherits:
-
Object
- Object
- Autodoc::Documents
- Defined in:
- lib/autodoc/documents.rb
Instance Method Summary collapse
- #append(context, example) ⇒ Object
-
#initialize ⇒ Documents
constructor
A new instance of Documents.
- #write ⇒ Object
Constructor Details
#initialize ⇒ Documents
Returns a new instance of Documents.
5 6 7 |
# File 'lib/autodoc/documents.rb', line 5 def initialize @table = Hash.new {|table, key| table[key] = [] } end |
Instance Method Details
#append(context, example) ⇒ Object
9 10 11 12 |
# File 'lib/autodoc/documents.rb', line 9 def append(context, example) document = Autodoc::Document.new(context.clone, example.clone) @table[document.pathname] << document end |
#write ⇒ Object
14 15 16 17 |
# File 'lib/autodoc/documents.rb', line 14 def write write_toc if Autodoc.configuration.toc write_documents end |