Sha256: c25c4fadb69d297a0ddc849c2c15ed8857222837b80f9c6e70b9fa903c339ff5

Contents?: true

Size: 1.37 KB

Versions: 14

Compression:

Stored size: 1.37 KB

Contents

# Writer - html metadata writer

# History:
#  Stan Smith 2017 03-21 refactored for mdTranslator 2.0
#  Stan Smith 2015-07-16 refactored to remove global namespace $HtmlNS
#  Stan Smith 2015-06-23 replace global ($response) with passed in object (responseObj)
#  Stan Smith 2015-01-28 original script

require 'builder'
require_relative 'version'
require_relative 'sections/html_document'

module ADIWG
   module Mdtranslator
      module Writers
         module Simple_html

            def self.startWriter(intObj, responseObj)

               # set the format and version of the output file
               responseObj[:writerOutputFormat] = 'html'
               responseObj[:writerVersion] = ADIWG::Mdtranslator::Writers::Simple_html::VERSION

               # create new HTML document
               html = Builder::XmlMarkup.new(indent: 3)
               # metadataWriter = MdHtmlWriter.new(html, intObj, paramsObj)
               htmlDocument = Html_Document.new(html, intObj)
               metadata = htmlDocument.writeHtml(responseObj)

               # set writer pass to true if no messages
               # false or warning will be set by code that places the message
               if responseObj[:writerMessages].empty?
                  responseObj[:writerPass] = true
               end

               return metadata

            end # startWriter

         end
      end
   end
end

Version data entries

14 entries across 14 versions & 1 rubygems

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