Sha256: 4753e6a72fdde99f3eafad8b0393b9066be1385b57dce6d1e91dca56d93e07a9

Contents?: true

Size: 960 Bytes

Versions: 24

Compression:

Stored size: 960 Bytes

Contents

# mdJson 2.0 writer - time instant

# History:
#   Stan Smith 2017-03-15 original script

require 'jbuilder'
require_relative 'mdJson_identifier'
require_relative 'mdJson_dateTime'

module ADIWG
   module Mdtranslator
      module Writers
         module MdJson

            module TimeInstant

               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?
                  end

               end # build
            end # TimeInstant

         end
      end
   end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.0.0rc5 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb
adiwg-mdtranslator-2.0.0rc4 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb
adiwg-mdtranslator-2.0.0rc3 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb
adiwg-mdtranslator-2.0.0rc2 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb