Sha256: e818ba88774d16cd65a0c86eccf10ba5aa523805310d935e380677f9d44cbff4

Contents?: true

Size: 1.27 KB

Versions: 26

Compression:

Stored size: 1.27 KB

Contents

require 'rdoc/generators/template/html/html'

#
# Add a template for documenting configurations.  Do so by inserting in the 
# template into the content regions used to template html.
# (see  'rdoc/generators/html_generator' line 864)
#
[
RDoc::Page::BODY, 
RDoc::Page::FILE_PAGE, 
RDoc::Page::METHOD_LIST].each do |content|
  
  # this substitution method duplicates the attribute template for configurations
  # (see rdoc\generators\template\html line 523)
  #
  #IF:attributes
  #    <div id="attribute-list">
  #      <h3 class="section-bar">Attributes</h3>
  #
  #      <div class="name-list">
  #        <table>
  #START:attributes
  #        <tr class="top-aligned-row context-row">
  #          <td class="context-item-name">%name%</td>
  #IF:rw
  #          <td class="context-item-value">&nbsp;[%rw%]&nbsp;</td>
  #ENDIF:rw
  #IFNOT:rw
  #          <td class="context-item-value">&nbsp;&nbsp;</td>
  #ENDIF:rw
  #          <td class="context-item-desc">%a_desc%</td>
  #        </tr>
  #END:attributes
  #        </table>
  #      </div>
  #    </div>
  #ENDIF:attributes
  #
  content.gsub!(/IF:attributes.*?ENDIF:attributes/m) do |match|
    match + "\n\n" + match.gsub(/attributes/, 'configurations').gsub(/Attributes/, 'Configurations')
  end
end

Version data entries

26 entries across 26 versions & 3 rubygems

Version Path
tap-0.9.0 lib/tap/support/tdoc/tdoc_html_template.rb
tap-0.11.1 lib/tap/support/tdoc/tdoc_html_template.rb
tap-0.10.1 lib/tap/support/tdoc/tdoc_html_template.rb
tap-0.10.0 lib/tap/support/tdoc/tdoc_html_template.rb
tap-0.8.0 lib/tap/support/tdoc/tdoc_html_template.rb
tap-0.9.1 lib/tap/support/tdoc/tdoc_html_template.rb