Sha256: 20944942f0e524efbeee8d9c52d4177565a20894e52e77fc9f4b2be77013e3c8

Contents?: true

Size: 1.64 KB

Versions: 16

Compression:

Stored size: 1.64 KB

Contents

# HTML writer
# resource specific usage

# History:
# 	Stan Smith 2015-03-25 original script
#   Stan Smith 2015-07-16 refactored to remove global namespace $HtmlNS

require_relative 'html_responsibleParty'

module ADIWG
    module Mdtranslator
        module Writers
            module Html

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

                    def writeHtml(hUsage)

                        # classes used
                        htmlRParty = MdHtmlResponsibleParty.new(@html)

                        # resource usage - use - required
                        @html.em('Use: ')
                        @html.text!(hUsage[:specificUsage])
                        @html.br

                        # resource usage - userLimits
                        s = hUsage[:userLimits]
                        if !s.nil?
                            @html.em('Limits: ')
                            @html.text!(s)
                            @html.br
                        end

                        # resource usage - userContacts
                        aUseCon = hUsage[:userContacts]
                        if !aUseCon.empty?
                            @html.em('Contacts:')
                            @html.section(:class=>'block') do
                                aUseCon.each do |hRepParty|
                                    htmlRParty.writeHtml(hRepParty)
                                end
                            end
                        end

                    end # writeHtml

                end # class

            end
        end
    end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
adiwg-mdtranslator-1.4.0 lib/adiwg/mdtranslator/writers/html/sections/html_resourceUsage.rb
adiwg-mdtranslator-1.4.0.beta14 lib/adiwg/mdtranslator/writers/html/sections/html_resourceUsage.rb
adiwg-mdtranslator-1.4.0.beta13 lib/adiwg/mdtranslator/writers/html/sections/html_resourceUsage.rb
adiwg-mdtranslator-1.4.0.beta12 lib/adiwg/mdtranslator/writers/html/sections/html_resourceUsage.rb
adiwg-mdtranslator-1.4.0.beta11 lib/adiwg/mdtranslator/writers/html/sections/html_resourceUsage.rb
adiwg-mdtranslator-1.4.0.beta10 lib/adiwg/mdtranslator/writers/html/sections/html_resourceUsage.rb
adiwg-mdtranslator-1.4.0.beta9 lib/adiwg/mdtranslator/writers/html/sections/html_resourceUsage.rb
adiwg-mdtranslator-1.4.0.beta8 lib/adiwg/mdtranslator/writers/html/sections/html_resourceUsage.rb
adiwg-mdtranslator-1.4.0.beta7 lib/adiwg/mdtranslator/writers/html/sections/html_resourceUsage.rb
adiwg-mdtranslator-1.4.0.beta6 lib/adiwg/mdtranslator/writers/html/sections/html_resourceUsage.rb
adiwg-mdtranslator-1.4.0.beta5 lib/adiwg/mdtranslator/writers/html/sections/html_resourceUsage.rb
adiwg-mdtranslator-1.4.0.beta4 lib/adiwg/mdtranslator/writers/html/sections/html_resourceUsage.rb
adiwg-mdtranslator-1.4.0.beta3 lib/adiwg/mdtranslator/writers/html/sections/html_resourceUsage.rb
adiwg-mdtranslator-1.4.0.beta2 lib/adiwg/mdtranslator/writers/html/sections/html_resourceUsage.rb
adiwg-mdtranslator-1.4.0.beta1 lib/adiwg/mdtranslator/writers/html/sections/html_resourceUsage.rb
adiwg-mdtranslator-1.3.0 lib/adiwg/mdtranslator/writers/html/sections/html_resourceUsage.rb