Class: ADIWG::Mdtranslator::Writers::Simple_html::Html_EntityIndex
- Inherits:
-
Object
- Object
- ADIWG::Mdtranslator::Writers::Simple_html::Html_EntityIndex
- Defined in:
- lib/adiwg/mdtranslator/writers/simple_html/sections/html_entityIndex.rb
Instance Method Summary collapse
-
#initialize(html) ⇒ Html_EntityIndex
constructor
A new instance of Html_EntityIndex.
- #writeHtml(hIndex) ⇒ Object
Constructor Details
#initialize(html) ⇒ Html_EntityIndex
Returns a new instance of Html_EntityIndex.
15 16 17 |
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_entityIndex.rb', line 15 def initialize(html) @html = html end |
Instance Method Details
#writeHtml(hIndex) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_entityIndex.rb', line 19 def writeHtml(hIndex) # entity index - name unless hIndex[:indexCode].nil? @html.em('Code: ') @html.text!(hIndex[:indexCode]) @html.br end # entity index - duplicate {Boolean} @html.em('Allow Duplicates: ') @html.text!(hIndex[:duplicate].to_s) @html.br # entity index - attribute names unless hIndex[:attributeNames].empty? @html.em('Index Attribute(s):') @html.div(:class => 'block') do hIndex[:attributeNames].each do |attribute| @html.text!(attribute) @html.br end end end end |