class ADIWG::Mdtranslator::Writers::Html::Html_OrderProcess

Public Class Methods

new(html) click to toggle source
# File lib/adiwg/mdtranslator/writers/html/sections/html_orderProcess.rb, line 18
def initialize(html)
   @html = html
end

Public Instance Methods

writeHtml(hOrder) click to toggle source
# File lib/adiwg/mdtranslator/writers/html/sections/html_orderProcess.rb, line 22
def writeHtml(hOrder)

   # classes used
   datetimeClass = Html_Datetime.new(@html)

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

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

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

   # order process - planned dateTime
   unless hOrder[:plannedAvailability].empty?
      @html.em('Planned Availability: ')
      dateStr = datetimeClass.writeHtml(hOrder[:plannedAvailability])
      @html.text!(dateStr)
   end

end