class ADIWG::Mdtranslator::Writers::Html::Html_Format

Public Class Methods

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

Public Instance Methods

writeHtml(hFormat) click to toggle source
# File lib/adiwg/mdtranslator/writers/html/sections/html_format.rb, line 23
def writeHtml(hFormat)

   # classes used
   citationClass = Html_Citation.new(@html)

   # resource format - format specification {citation}
   unless hFormat[:formatSpecification].empty?
      @html.details do
         @html.summary(hFormat[:formatSpecification][:title], {'class' => 'h5'})
         @html.section(:class => 'block') do
            citationClass.writeHtml(hFormat[:formatSpecification])
         end
      end
   end

   # resource format - amendment number
   unless hFormat[:amendmentNumber].nil?
      @html.em('Amendment Number: ')
      @html.text!(hFormat[:amendmentNumber])
      @html.br
   end

   # resource format - compression method
   unless hFormat[:compressionMethod].nil?
      @html.em('Compression Method: ')
      @html.text!(hFormat[:compressionMethod])
      @html.br
   end

   # distribution - technical prerequisite
   unless hFormat[:technicalPrerequisite].nil?
      @html.em('Technical Prerequisite:')
      @html.section(:class => 'block') do
         @html.text!(hFormat[:technicalPrerequisite])
      end
   end

end