class ADIWG::Mdtranslator::Writers::Html::Html_TimeInstant
Public Class Methods
new(html)
click to toggle source
# File lib/adiwg/mdtranslator/writers/html/sections/html_timeInstant.rb, line 21 def initialize(html) @html = html end
Public Instance Methods
writeHtml(hInstant)
click to toggle source
# File lib/adiwg/mdtranslator/writers/html/sections/html_timeInstant.rb, line 25 def writeHtml(hInstant) # classes used identifierClass = Html_Identifier.new(@html) datetimeClass = Html_Datetime.new(@html) geoAgeClass = Html_GeologicAge.new(@html) # time instant - id unless hInstant[:timeId].nil? @html.em('Instant ID: ') @html.text!(hInstant[:timeId]) @html.br end # time instant - instant name [] hInstant[:instantNames].each do |iName| @html.em('Instant Name: ') @html.text!(iName) @html.br end # time instant - dateTime unless hInstant[:timeInstant].empty? @html.em('DateTime: ') @html.text!(datetimeClass.writeHtml(hInstant[:timeInstant])) @html.br end # time instant - description unless hInstant[:description].nil? @html.em('Description: ') @html.section(:class => 'block') do @html.text!(hInstant[:description]) end end # time instant - geologic age unless hInstant[:geologicAge].empty? geoAgeClass.writeHtml(hInstant[:geologicAge]) end # time instant - identifier {identifier} unless hInstant[:identifier].empty? @html.details do @html.summary('Identifier', 'class' => 'h5') @html.section(:class => 'block') do identifierClass.writeHtml(hInstant[:identifier]) end end end end