Sha256: 0144bcee6707c7f7041330f3d41902e8b0193127d9aafaf328d1ba2f7c6e2539

Contents?: true

Size: 1.7 KB

Versions: 13

Compression:

Stored size: 1.7 KB

Contents

# HTML writer
# result file

require_relative 'html_format'

module ADIWG
   module Mdtranslator
      module Writers
         module Html

            class Html_ResultFile

               def initialize(html)
                  @html = html
               end

               def writeHtml(hResultFile)

                  # classes used
                  formatClass = Html_Format.new(@html)

                  
                  # result file - file name
                  unless hResultFile[:fileName].nil?
                    @html.em('File Name: ')
                    @html.text!(hResultFile[:fileName])
                    @html.br
                  end

                  # result file - file type
                  unless hResultFile[:fileType].nil?
                    @html.em('File Type: ')
                    @html.text!(hResultFile[:fileType])
                    @html.br
                 end

                 # result file - file description
                 unless hResultFile[:fileDescription].nil?
                    @html.em('File Description: ')
                    @html.text!(hResultFile[:fileDescription])
                    @html.br
                 end

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

               end # writeHtml
            end # Html_Format

         end
      end
   end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.19.0.pre.beta.31 lib/adiwg/mdtranslator/writers/html/sections/html_resultFile.rb
adiwg-mdtranslator-2.19.0.pre.beta.30 lib/adiwg/mdtranslator/writers/html/sections/html_resultFile.rb
adiwg-mdtranslator-2.19.0.pre.beta.29 lib/adiwg/mdtranslator/writers/html/sections/html_resultFile.rb
adiwg-mdtranslator-2.19.0.pre.beta.28 lib/adiwg/mdtranslator/writers/html/sections/html_resultFile.rb
adiwg-mdtranslator-2.19.0.pre.beta.27 lib/adiwg/mdtranslator/writers/html/sections/html_resultFile.rb
adiwg-mdtranslator-2.19.0.pre.beta.26 lib/adiwg/mdtranslator/writers/html/sections/html_resultFile.rb
adiwg-mdtranslator-2.19.0.pre.beta.13 lib/adiwg/mdtranslator/writers/html/sections/html_resultFile.rb
adiwg-mdtranslator-2.19.0.pre.beta.12 lib/adiwg/mdtranslator/writers/html/sections/html_resultFile.rb
adiwg-mdtranslator-2.19.0.pre.beta.11 lib/adiwg/mdtranslator/writers/html/sections/html_resultFile.rb
adiwg-mdtranslator-2.19.0.pre.beta.10 lib/adiwg/mdtranslator/writers/html/sections/html_resultFile.rb
adiwg-mdtranslator-2.19.0.pre.beta.9 lib/adiwg/mdtranslator/writers/html/sections/html_resultFile.rb
adiwg-mdtranslator-2.19.0.pre.beta.8 lib/adiwg/mdtranslator/writers/html/sections/html_resultFile.rb
adiwg-mdtranslator-2.19.0.pre.beta.7 lib/adiwg/mdtranslator/writers/html/sections/html_resultFile.rb