Class: Document
Overview
This class uses a dynamically-assigned generator class to walk the documentation array and build the final output document.
Instance Method Summary collapse
-
#initialize(generator) ⇒ Document
constructor
Initializes the document system with an appropriate generator, checks for sanity in the setup and then builds the document internally.
-
#to_s ⇒ Object
Converts the built document into a string.
Constructor Details
#initialize(generator) ⇒ Document
Initializes the document system with an appropriate generator, checks for sanity in the setup and then builds the document internally.
224 225 226 227 228 229 230 231 232 |
# File 'lib/rweb.rb', line 224 def initialize(generator) @output = [] @generator=generator @style = generator.style @docs = generator.docs @directives = generator.directives check_sanity build_document end |
Instance Method Details
#to_s ⇒ Object
Converts the built document into a string.
235 236 237 |
# File 'lib/rweb.rb', line 235 def to_s @output.to_s end |