Sha256: c2f7cd6c756e9acca49bbcc39ec874fdebb1c80020badbcd9d0f8f9fd556a0be
Contents?: true
Size: 1.86 KB
Versions: 4
Compression:
Stored size: 1.86 KB
Contents
# HTML writer # temporal element # History: # Stan Smith 2015-04-03 original script require 'html_dateTime' require 'html_timePeriod' require 'html_timeInstant' module ADIWG module Mdtranslator module Writers module Html class MdHtmlTemporalElement def initialize(html) @html = html end def writeHtml(hTempEle) # classes used htmlDT = $HtmlNS::MdHtmlDateTime.new(@html) htmlTimeP = $HtmlNS::MdHtmlTimePeriod.new(@html) htmlTimeI = $HtmlNS::MdHtmlTimeInstant.new(@html) # temporal element - date hDatetime = hTempEle[:date] if !hDatetime.empty? @html.em('Date: ') htmlDT.writeHtml(hDatetime) end # temporal element - time instant hTimeInstant = hTempEle[:timeInstant] if !hTimeInstant.empty? @html.em('Time instant: ') @html.section(:class=>'block') do htmlTimeI.writeHtml(hTimeInstant) end end # temporal element - time period hTimePeriod = hTempEle[:timePeriod] if !hTimePeriod.empty? @html.em('Time period: ') @html.section(:class=>'block') do htmlTimeP.writeHtml(hTimePeriod) end end end # writeHtml end # class end end end end
Version data entries
4 entries across 4 versions & 1 rubygems