Module: ADIWG::Mdtranslator::Writers::MdJson::TimeInstant

Defined in:
lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb

Class Method Summary collapse

Class Method Details

.build(hTimeInstant) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb', line 19

def self.build(hTimeInstant)

   Jbuilder.new do |json|
      json.id hTimeInstant[:timeId]
      json.description hTimeInstant[:description]
      json.identifier Identifier.build(hTimeInstant[:identifier]) unless hTimeInstant[:identifier].empty?
      json.instantName hTimeInstant[:instantNames] unless hTimeInstant[:instantNames].empty?
      json.dateTime DateTime.build(hTimeInstant[:timeInstant]) unless hTimeInstant[:timeInstant].empty?
      json.geologicAge GeologicAge.build(hTimeInstant[:geologicAge]) unless hTimeInstant[:geologicAge].empty?
   end

end