class ADIWG::Mdtranslator::Writers::Html::Html_CoverageInfo

Public Class Methods

new(html) click to toggle source
# File lib/adiwg/mdtranslator/writers/html/sections/html_coverageInfo.rb, line 19
def initialize(html)
   @html = html
end

Public Instance Methods

writeHtml(hCoverage) click to toggle source
# File lib/adiwg/mdtranslator/writers/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.section(:class => 'block') do
         @html.text!(hCoverage[:coverageDescription])
      end
   end

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

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

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

end