Sha256: 7dcaa078ec49e5d11668b93fda2f4c74fe09fec6907c4ff62f22e969d21bbbdc

Contents?: true

Size: 1.95 KB

Versions: 12

Compression:

Stored size: 1.95 KB

Contents

# HTML writer
# releasability

# History:
#  Stan Smith 2017-03-31 original script

require_relative 'html_responsibility'

module ADIWG
   module Mdtranslator
      module Writers
         module Simple_html

            class Html_Releasability

               def initialize(html)
                  @html = html
               end

               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.div(:class => 'block') do
                        @html.text!(hRelease[:statement])
                     end
                  end

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

               end # writeHtml
            end # Html_Releasability

         end
      end
   end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.19.0.pre.beta.29 lib/adiwg/mdtranslator/writers/simple_html/sections/html_releasability.rb
adiwg-mdtranslator-2.19.0.pre.beta.28 lib/adiwg/mdtranslator/writers/simple_html/sections/html_releasability.rb
adiwg-mdtranslator-2.19.0.pre.beta.27 lib/adiwg/mdtranslator/writers/simple_html/sections/html_releasability.rb
adiwg-mdtranslator-2.19.0.pre.beta.26 lib/adiwg/mdtranslator/writers/simple_html/sections/html_releasability.rb
adiwg-mdtranslator-2.19.0.pre.beta.13 lib/adiwg/mdtranslator/writers/simple_html/sections/html_releasability.rb
adiwg-mdtranslator-2.19.0.pre.beta.12 lib/adiwg/mdtranslator/writers/simple_html/sections/html_releasability.rb
adiwg-mdtranslator-2.19.0.pre.beta.11 lib/adiwg/mdtranslator/writers/simple_html/sections/html_releasability.rb
adiwg-mdtranslator-2.19.0.pre.beta.10 lib/adiwg/mdtranslator/writers/simple_html/sections/html_releasability.rb
adiwg-mdtranslator-2.19.0.pre.beta.9 lib/adiwg/mdtranslator/writers/simple_html/sections/html_releasability.rb
adiwg-mdtranslator-2.19.0.pre.beta.8 lib/adiwg/mdtranslator/writers/simple_html/sections/html_releasability.rb
adiwg-mdtranslator-2.19.0.pre.beta.7 lib/adiwg/mdtranslator/writers/simple_html/sections/html_releasability.rb
adiwg-mdtranslator-2.18.4 lib/adiwg/mdtranslator/writers/simple_html/sections/html_releasability.rb