Class: ADIWG::Mdtranslator::Writers::Simple_html::MdHtmlClassedDataItem

Inherits:
Object
  • Object
show all
Defined in:
lib/adiwg/mdtranslator/writers/simple_html/sections/html_classedDataItem.rb

Instance Method Summary collapse

Constructor Details

#initialize(html) ⇒ MdHtmlClassedDataItem

Returns a new instance of MdHtmlClassedDataItem.



13
14
15
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_classedDataItem.rb', line 13

def initialize(html)
    @html = html
end

Instance Method Details

#writeHtml(hClassItem) ⇒ Object



17
18
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
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_classedDataItem.rb', line 17

def writeHtml(hClassItem)

    # classed data item - name
    s = hClassItem[:className]
    if !s.nil?
        @html.em('Item name: ')
        @html.text!(s)
        @html.br
    end

    # classed data item - description
    s = hClassItem[:classDescription]
    if !s.nil?
        @html.em('Item description: ')
        @html.text!(s)
        @html.br
    end

    # classed data item - value
    s = hClassItem[:classValue]
    if !s.nil?
        @html.em('Item value: ')
        @html.text!(s.to_s)
        @html.br
    end

end