Sha256: 89bdb5dc2eb312daffaf7ffd9e51efa4dc25bb74ca45853b6071ac1d7f5e785a

Contents?: true

Size: 1.38 KB

Versions: 70

Compression:

Stored size: 1.38 KB

Contents

# HTML writer
# attribute group

# History:
#  Stan Smith 2017-04-02 refactored for mdTranslator 2.0
# 	Stan Smith 2015-08-21 original script

require_relative 'html_attribute'

module ADIWG
   module Mdtranslator
      module Writers
         module Html

            class Html_AttributeGroup

               def initialize(html)
                  @html = html
               end

               def writeHtml(hGroup)

                  # classes used
                  attributeClass = Html_Attribute.new(@html)

                  # attribute group - content type [] {CoverageContentTypeCode}
                  hGroup[:attributeContentTypes].each do |type|
                     @html.em('Content Type: ')
                     @html.text!(type)
                     @html.br
                  end

                  # attribute group - attribute [] {attribute}
                  counter = 0
                  hGroup[:attributes].each do |hAttribute|
                     @html.details do
                        counter += 1
                        @html.summary('Attribute '+counter.to_s, {'class' => 'h5'})
                        @html.section(:class => 'block') do
                           attributeClass.writeHtml(hAttribute)
                        end
                     end
                  end

               end # writeHtml
            end # Html_AttributeGroup

         end
      end
   end
end

Version data entries

70 entries across 70 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.18.0rc6 lib/adiwg/mdtranslator/writers/html/sections/html_attributeGroup.rb
adiwg-mdtranslator-2.18.0rc5 lib/adiwg/mdtranslator/writers/html/sections/html_attributeGroup.rb
adiwg-mdtranslator-2.18.0rc4 lib/adiwg/mdtranslator/writers/html/sections/html_attributeGroup.rb
adiwg-mdtranslator-2.18.0rc3 lib/adiwg/mdtranslator/writers/html/sections/html_attributeGroup.rb
adiwg-mdtranslator-2.18.0rc2 lib/adiwg/mdtranslator/writers/html/sections/html_attributeGroup.rb
adiwg-mdtranslator-2.18.0rc1 lib/adiwg/mdtranslator/writers/html/sections/html_attributeGroup.rb
adiwg-mdtranslator-2.17.1 lib/adiwg/mdtranslator/writers/html/sections/html_attributeGroup.rb
adiwg-mdtranslator-2.16.1 lib/adiwg/mdtranslator/writers/html/sections/html_attributeGroup.rb
adiwg-mdtranslator-2.15.0 lib/adiwg/mdtranslator/writers/html/sections/html_attributeGroup.rb
adiwg-mdtranslator-2.14.2 lib/adiwg/mdtranslator/writers/html/sections/html_attributeGroup.rb
adiwg-mdtranslator-2.14.1 lib/adiwg/mdtranslator/writers/html/sections/html_attributeGroup.rb
adiwg-mdtranslator-2.14.0 lib/adiwg/mdtranslator/writers/html/sections/html_attributeGroup.rb
adiwg-mdtranslator-2.13.3 lib/adiwg/mdtranslator/writers/html/sections/html_attributeGroup.rb
adiwg-mdtranslator-2.13.2 lib/adiwg/mdtranslator/writers/html/sections/html_attributeGroup.rb
adiwg-mdtranslator-2.13.1 lib/adiwg/mdtranslator/writers/html/sections/html_attributeGroup.rb
adiwg-mdtranslator-2.13.0 lib/adiwg/mdtranslator/writers/html/sections/html_attributeGroup.rb
adiwg-mdtranslator-2.12.0 lib/adiwg/mdtranslator/writers/html/sections/html_attributeGroup.rb
adiwg-mdtranslator-2.12.0.pre lib/adiwg/mdtranslator/writers/html/sections/html_attributeGroup.rb
adiwg-mdtranslator-2.10.0 lib/adiwg/mdtranslator/writers/html/sections/html_attributeGroup.rb
adiwg-mdtranslator-2.9.2 lib/adiwg/mdtranslator/writers/html/sections/html_attributeGroup.rb