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.5.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb
adiwg-mdtranslator-2.4.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb
adiwg-mdtranslator-2.3.5 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb
adiwg-mdtranslator-2.3.4 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb
adiwg-mdtranslator-2.3.3 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb
adiwg-mdtranslator-2.3.2 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb
adiwg-mdtranslator-2.3.1 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb
adiwg-mdtranslator-2.3.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb
adiwg-mdtranslator-2.2.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb
adiwg-mdtranslator-2.1.2 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb
adiwg-mdtranslator-2.1.1 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb
adiwg-mdtranslator-2.1.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb
adiwg-mdtranslator-2.0.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb
adiwg-mdtranslator-2.0.0rc13 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb
adiwg-mdtranslator-2.0.0rc11 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb
adiwg-mdtranslator-2.0.0rc10 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb
adiwg-mdtranslator-2.0.0rc9 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb
adiwg-mdtranslator-2.0.0rc8 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb
adiwg-mdtranslator-2.0.0rc7 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb
adiwg-mdtranslator-2.0.0rc6 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timeInstant.rb