Class: ADIWG::Mdtranslator::Writers::Simple_html::Html_CoverageInfo

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

Instance Method Summary collapse

Constructor Details

#initialize(html) ⇒ Html_CoverageInfo

Returns a new instance of Html_CoverageInfo.



19
20
21
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_coverageInfo.rb', line 19

def initialize(html)
   @html = html
end

Instance Method Details

#writeHtml(hCoverage) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_coverageInfo.rb', line 23

def writeHtml(hCoverage)

   # classes used
   identifierClass = Html_Identifier.new(@html)
   attGroupClass = Html_AttributeGroup.new(@html)
   imageClass = Html_ImageInfo.new(@html)

   # coverage - name
   unless hCoverage[:coverageName].nil?
      @html.em('Name: ')
      @html.text!(hCoverage[:coverageName])
      @html.br
   end

   # coverage - description
   unless hCoverage[:coverageDescription].nil?
      @html.em('Description: ')
      @html.div(:class => 'block') do
         @html.text!(hCoverage[:coverageDescription])
      end
   end

   # coverage - process level code
   unless hCoverage[:processingLevelCode].empty?
      @html.div do
         @html.div('Processing Level Code', {'class' => 'h5'})
         @html.div(:class => 'block') do
            identifierClass.writeHtml(hCoverage[:processingLevelCode])
         end
      end
   end

   # coverage - attribute group [] {attributeGroup}
   hCoverage[:attributeGroups].each do |hAttGroup|
      @html.div do
         @html.div('Attribute Group', {'class' => 'h5'})
         @html.div(:class => 'block') do
            attGroupClass.writeHtml(hAttGroup)
         end
      end
   end

   # coverage - image description {imageInfo}
   unless hCoverage[:imageDescription].empty?
      @html.div do
         @html.div('Image Description', {'class' => 'h5'})
         @html.div(:class => 'block') do
            imageClass.writeHtml(hCoverage[:imageDescription])
         end
      end
   end

end