Sha256: 276134352c91d2723647335edc935372268b9c7f71fe6393bc590ec63a100462

Contents?: true

Size: 1.91 KB

Versions: 16

Compression:

Stored size: 1.91 KB

Contents

# HTML writer
# order process

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

require_relative 'html_dateTime'

module ADIWG
    module Mdtranslator
        module Writers
            module Html

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

                    def writeHtml(hOrder)

                        # classes used
                        htmlDateTime = MdHtmlDateTime.new(@html)

                        # order process - order instructions
                        s = hOrder[:orderInstructions]
                        if !s.nil?
                            @html.em('Order instructions: ')
                            @html.section(:class=>'block') do
                                @html.text!(s)
                            end
                        end

                        # order process - fees
                        s = hOrder[:fees]
                        if !s.nil?
                            @html.em('Fees: ')
                            @html.text!(s)
                            @html.br
                        end

                        # order process - turnaround
                        s = hOrder[:turnaround]
                        if !s.nil?
                            @html.em('Turnaround: ')
                            @html.text!(s)
                            @html.br
                        end

                        # order process - planned dateTime
                        hDatetime = hOrder[:plannedDateTime]
                        if !hDatetime.empty?
                            @html.em('Planned Availability: ')
                            htmlDateTime.writeHtml(hDatetime)
                        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_orderProcess.rb
adiwg-mdtranslator-1.4.0.beta14 lib/adiwg/mdtranslator/writers/html/sections/html_orderProcess.rb
adiwg-mdtranslator-1.4.0.beta13 lib/adiwg/mdtranslator/writers/html/sections/html_orderProcess.rb
adiwg-mdtranslator-1.4.0.beta12 lib/adiwg/mdtranslator/writers/html/sections/html_orderProcess.rb
adiwg-mdtranslator-1.4.0.beta11 lib/adiwg/mdtranslator/writers/html/sections/html_orderProcess.rb
adiwg-mdtranslator-1.4.0.beta10 lib/adiwg/mdtranslator/writers/html/sections/html_orderProcess.rb
adiwg-mdtranslator-1.4.0.beta9 lib/adiwg/mdtranslator/writers/html/sections/html_orderProcess.rb
adiwg-mdtranslator-1.4.0.beta8 lib/adiwg/mdtranslator/writers/html/sections/html_orderProcess.rb
adiwg-mdtranslator-1.4.0.beta7 lib/adiwg/mdtranslator/writers/html/sections/html_orderProcess.rb
adiwg-mdtranslator-1.4.0.beta6 lib/adiwg/mdtranslator/writers/html/sections/html_orderProcess.rb
adiwg-mdtranslator-1.4.0.beta5 lib/adiwg/mdtranslator/writers/html/sections/html_orderProcess.rb
adiwg-mdtranslator-1.4.0.beta4 lib/adiwg/mdtranslator/writers/html/sections/html_orderProcess.rb
adiwg-mdtranslator-1.4.0.beta3 lib/adiwg/mdtranslator/writers/html/sections/html_orderProcess.rb
adiwg-mdtranslator-1.4.0.beta2 lib/adiwg/mdtranslator/writers/html/sections/html_orderProcess.rb
adiwg-mdtranslator-1.4.0.beta1 lib/adiwg/mdtranslator/writers/html/sections/html_orderProcess.rb
adiwg-mdtranslator-1.3.0 lib/adiwg/mdtranslator/writers/html/sections/html_orderProcess.rb