Sha256: 9fb2016e08d81013db3c53a4b128c66d0c5189c02c63a17ec5f111081038e8ba

Contents?: true

Size: 1.2 KB

Versions: 13

Compression:

Stored size: 1.2 KB

Contents

# HTML writer
# algorithm

# History:
#  Stan Smith 2019-09-24 original script

require_relative 'html_citation'

module ADIWG
   module Mdtranslator
      module Writers
         module Simple_html

            class Html_Algorithm

               def initialize(html)
                  @html = html
               end

               def writeHtml(hAlgorithm)

                  # classes used
                  citationClass = Html_Citation.new(@html)

                  # algorithm - description
                  unless hAlgorithm[:description].nil?
                     @html.em('Description: ')
                     @html.text!(hAlgorithm[:description])
                     @html.br
                  end

                  # algorithm - citation {citation}
                  unless hAlgorithm[:citation].empty?
                     @html.div do
                        @html.h5('Algorithm citation', {'class' => 'h5'})
                        @html.div(:class => 'block') do
                           citationClass.writeHtml(hAlgorithm[:citation])
                        end
                     end
                  end

               end # writeHtml
            end # Html_Algorithm

         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/simple_html/sections/html_algorithm.rb
adiwg-mdtranslator-2.19.0.pre.beta.30 lib/adiwg/mdtranslator/writers/simple_html/sections/html_algorithm.rb
adiwg-mdtranslator-2.19.0.pre.beta.29 lib/adiwg/mdtranslator/writers/simple_html/sections/html_algorithm.rb
adiwg-mdtranslator-2.19.0.pre.beta.28 lib/adiwg/mdtranslator/writers/simple_html/sections/html_algorithm.rb
adiwg-mdtranslator-2.19.0.pre.beta.27 lib/adiwg/mdtranslator/writers/simple_html/sections/html_algorithm.rb
adiwg-mdtranslator-2.19.0.pre.beta.26 lib/adiwg/mdtranslator/writers/simple_html/sections/html_algorithm.rb
adiwg-mdtranslator-2.19.0.pre.beta.13 lib/adiwg/mdtranslator/writers/simple_html/sections/html_algorithm.rb
adiwg-mdtranslator-2.19.0.pre.beta.12 lib/adiwg/mdtranslator/writers/simple_html/sections/html_algorithm.rb
adiwg-mdtranslator-2.19.0.pre.beta.11 lib/adiwg/mdtranslator/writers/simple_html/sections/html_algorithm.rb
adiwg-mdtranslator-2.19.0.pre.beta.10 lib/adiwg/mdtranslator/writers/simple_html/sections/html_algorithm.rb
adiwg-mdtranslator-2.19.0.pre.beta.9 lib/adiwg/mdtranslator/writers/simple_html/sections/html_algorithm.rb
adiwg-mdtranslator-2.19.0.pre.beta.8 lib/adiwg/mdtranslator/writers/simple_html/sections/html_algorithm.rb
adiwg-mdtranslator-2.19.0.pre.beta.7 lib/adiwg/mdtranslator/writers/simple_html/sections/html_algorithm.rb