Sha256: 6807e887247c377d74787b9823388cf2d2f3ed53be975de67cc444535f4a81b0

Contents?: true

Size: 1.09 KB

Versions: 35

Compression:

Stored size: 1.09 KB

Contents

# mdJson 2.0 writer - medium

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

require 'jbuilder'
require_relative 'mdJson_citation'
require_relative 'mdJson_identifier'

module ADIWG
   module Mdtranslator
      module Writers
         module MdJson

            module Medium

               @Namespace = ADIWG::Mdtranslator::Writers::MdJson

               def self.build(hMedium)

                  Jbuilder.new do |json|
                     json.mediumSpecification Citation.build(hMedium[:mediumSpecification]) unless hMedium[:mediumSpecification].empty?
                     json.density hMedium[:density]
                     json.units hMedium[:units]
                     json.numberOfVolumes hMedium[:numberOfVolumes]
                     json.mediumFormat hMedium[:mediumFormat] unless hMedium[:mediumFormat].empty?
                     json.note hMedium[:note]
                     json.identifier Identifier.build(hMedium[:identifier]) unless hMedium[:identifier].empty?
                  end

               end # build
            end # Medium
            
         end
      end
   end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.1.2 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.1.1 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.1.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.0.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.0.0rc13 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.0.0rc11 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.0.0rc10 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.0.0rc9 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.0.0rc8 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.0.0rc7 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.0.0rc6 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.0.0rc5 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.0.0rc4 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.0.0rc3 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.0.0rc2 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb