Sha256: dcfb15cb09be0d0760bf8bccc94c7ca1016d0acd1f6537d32f1d592fd8c313f7

Contents?: true

Size: 1.57 KB

Versions: 4

Compression:

Stored size: 1.57 KB

Contents

# HTML writer
# resource specific usage

# History:
# 	Stan Smith 2015-03-25 original script

require 'html_responsibleParty'

module ADIWG
    module Mdtranslator
        module Writers
            module Html

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

                    def writeHtml(hUsage)

                        # classes used
                        htmlRParty = $HtmlNS::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

4 entries across 4 versions & 1 rubygems

Version Path
adiwg-mdtranslator-1.2.1 lib/adiwg/mdtranslator/writers/html/sections/html_resourceUsage.rb
adiwg-mdtranslator-1.2.0 lib/adiwg/mdtranslator/writers/html/sections/html_resourceUsage.rb
adiwg-mdtranslator-1.1.1 lib/adiwg/mdtranslator/writers/html/sections/html_resourceUsage.rb
adiwg-mdtranslator-1.1.0 lib/adiwg/mdtranslator/writers/html/sections/html_resourceUsage.rb