class ADIWG::Mdtranslator::Writers::Html::Html_Releasability

Public Class Methods

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

Public Instance Methods

writeHtml(hRelease) click to toggle source
# File lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb, line 20
def writeHtml(hRelease)

   # classes used
   responsibilityClass = Html_Responsibility.new(@html)

   # releasability - dissemination constraint {restrictionCode}
   hRelease[:disseminationConstraint].each do |restriction|
      @html.em('Dissemination Constraint Code: ')
      @html.text!(restriction)
      @html.br
   end

   # releasability - statement
   unless hRelease[:statement].nil?
      @html.em('Statement: ')
      @html.section(:class => 'block') do
         @html.text!(hRelease[:statement])
      end
   end

   # releasability - addressee [] {responsibility}
   unless hRelease[:addressee].empty?
      @html.details do
         @html.summary('Applies to', {'class' => 'h5'})
         @html.section(:class => 'block') do
            hRelease[:addressee].each do |hAddressee|
               @html.details do
                  @html.summary(hAddressee[:roleName], 'class' => 'h5')
                  @html.section(:class => 'block') do
                     responsibilityClass.writeHtml(hAddressee)
                  end
               end
            end
         end
      end
   end

end