Sha256: 673c5529f446ed79ec781afcd4ad6a03bc2e89758af92f666590867323acd047

Contents?: true

Size: 1.7 KB

Versions: 41

Compression:

Stored size: 1.7 KB

Contents

# HTML writer
# distribution

# History:
#  Stan Smith 2018-01-29 add liabilityStatement
# 	Stan Smith 2017-04-04 original script

require_relative 'html_distributor'

module ADIWG
   module Mdtranslator
      module Writers
         module Html

            class Html_Distribution

               def initialize(html)
                  @html = html
               end

               def writeHtml(hDistribution)

                  # classes used
                  distributorClass = Html_Distributor.new(@html)

                  # distribution - description
                  unless hDistribution[:description].nil?
                     @html.em('Description:')
                     @html.section(:class => 'block') do
                        @html.text!(hDistribution[:description])
                     end
                  end

                  # distribution - liability statement
                  unless hDistribution[:liabilityStatement].nil?
                     @html.em('Liability Statement:')
                     @html.section(:class => 'block') do
                        @html.text!(hDistribution[:liabilityStatement])
                     end
                  end

                  # distribution - distributor [] {distributor}
                  hDistribution[:distributor].each do |hDistributor|
                     @html.details do
                        @html.summary('Distributor', {'class' => 'h5'})
                        @html.section(:class => 'block') do
                           distributorClass.writeHtml(hDistributor)
                        end
                     end
                  end

               end # writeHtml
            end # Html_Distribution

         end
      end
   end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.19.0.pre.beta.31 lib/adiwg/mdtranslator/writers/html/sections/html_distribution.rb
adiwg-mdtranslator-2.19.0.pre.beta.30 lib/adiwg/mdtranslator/writers/html/sections/html_distribution.rb
adiwg-mdtranslator-2.19.0.pre.beta.29 lib/adiwg/mdtranslator/writers/html/sections/html_distribution.rb
adiwg-mdtranslator-2.19.0.pre.beta.28 lib/adiwg/mdtranslator/writers/html/sections/html_distribution.rb
adiwg-mdtranslator-2.19.0.pre.beta.27 lib/adiwg/mdtranslator/writers/html/sections/html_distribution.rb
adiwg-mdtranslator-2.19.0.pre.beta.26 lib/adiwg/mdtranslator/writers/html/sections/html_distribution.rb
adiwg-mdtranslator-2.19.0.pre.beta.13 lib/adiwg/mdtranslator/writers/html/sections/html_distribution.rb
adiwg-mdtranslator-2.19.0.pre.beta.12 lib/adiwg/mdtranslator/writers/html/sections/html_distribution.rb
adiwg-mdtranslator-2.19.0.pre.beta.11 lib/adiwg/mdtranslator/writers/html/sections/html_distribution.rb
adiwg-mdtranslator-2.19.0.pre.beta.10 lib/adiwg/mdtranslator/writers/html/sections/html_distribution.rb
adiwg-mdtranslator-2.19.0.pre.beta.9 lib/adiwg/mdtranslator/writers/html/sections/html_distribution.rb
adiwg-mdtranslator-2.19.0.pre.beta.8 lib/adiwg/mdtranslator/writers/html/sections/html_distribution.rb
adiwg-mdtranslator-2.19.0.pre.beta.7 lib/adiwg/mdtranslator/writers/html/sections/html_distribution.rb
adiwg-mdtranslator-2.18.4 lib/adiwg/mdtranslator/writers/html/sections/html_distribution.rb
adiwg-mdtranslator-2.18.2 lib/adiwg/mdtranslator/writers/html/sections/html_distribution.rb
adiwg-mdtranslator-2.18.1 lib/adiwg/mdtranslator/writers/html/sections/html_distribution.rb
adiwg-mdtranslator-2.18.0 lib/adiwg/mdtranslator/writers/html/sections/html_distribution.rb
adiwg-mdtranslator-2.18.0rc9 lib/adiwg/mdtranslator/writers/html/sections/html_distribution.rb
adiwg-mdtranslator-2.18.0rc8 lib/adiwg/mdtranslator/writers/html/sections/html_distribution.rb
adiwg-mdtranslator-2.18.0rc7 lib/adiwg/mdtranslator/writers/html/sections/html_distribution.rb