Sha256: 52f43c214c1202bdf190fc7dc7fe70957358f11fb776b119450639cd7ad410e8

Contents?: true

Size: 1.44 KB

Versions: 86

Compression:

Stored size: 1.44 KB

Contents

# HTML writer
# classed data

# History:
# 	Stan Smith 2015-08-21 original script

require_relative 'html_classedDataItem'

module ADIWG
    module Mdtranslator
        module Writers
            module Html

                class MdHtmlClassedData
                    def initialize(html)
                        @html = html
                    end

                    def writeHtml(hClassD)

                        # classes used
                        htmlClassItem = MdHtmlClassedDataItem.new(@html)

                        # classed data - number of classes
                        s = hClassD[:numberOfClasses]
                        if !s.nil?
                            @html.em('Number of classes: ')
                            @html.text!(s.to_s)
                            @html.br
                        end

                        # classed data - data items
                        aClassItems = hClassD[:classedDataItems]
                        aClassItems.each do |hClassItem|
                            @html.details do
                                @html.summary(hClassItem[:className], {'class'=>'h5'})
                                @html.section(:class=>'block') do
                                    htmlClassItem.writeHtml(hClassItem)
                                end
                            end
                        end

                    end # writeHtml

                end # class

            end
        end
    end
end

Version data entries

86 entries across 86 versions & 1 rubygems

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