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.13.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.12.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.12.0.pre lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.10.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.9.2 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.9.1 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.9.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.8.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.7.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.6.1 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.6.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.5.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.4.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.3.5 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.3.4 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.3.3 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.3.2 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.3.1 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.3.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb
adiwg-mdtranslator-2.2.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb