Sha256: 3f66c104ba8bf48c83617c890ab943ddbfabc7deb65b286a98db68d8b91c5c34

Contents?: true

Size: 1.77 KB

Versions: 12

Compression:

Stored size: 1.77 KB

Contents

# HTML writer
# vector representation

# History:
#  Stan Smith 2017-10-13 trap missing topology level
#  Stan Smith 2017-03-28 original script

require_relative 'html_vectorObject'
require_relative 'html_scope'

module ADIWG
   module Mdtranslator
      module Writers
         module Simple_html

            class Html_VectorRepresentation

               def initialize(html)
                  @html = html
               end

               def writeHtml(hVector)

                  # classes used
                  objectClass = Html_VectorObject.new(@html)
                  scopeClass = Html_Scope.new(@html)

                  # vector representation - scope
                  hVector[:scope].each do |scope|
                     @html.div do
                        @html.div('Scope ', 'class' => 'h5')
                        @html.div(:class => 'block') do
                           scopeClass.writeHtml(hVector[:scope])
                        end
                     end
                  end


                  # vector representation - topology level
                  unless hVector[:topologyLevel].nil?
                     @html.em('Topology Level: ')
                     @html.text!(hVector[:topologyLevel])
                     @html.br
                  end

                  # vector representation - vector object []
                  hVector[:vectorObject].each do |hObject|
                     @html.div do
                        @html.div('Vector Object ', 'class' => 'h5')
                        @html.div(:class => 'block') do
                           objectClass.writeHtml(hObject)
                        end
                     end
                  end

               end # writeHtml
            end # Html_VectorRepresentation

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