Sha256: 22b87bdf49fd4061d6e8d0029d3c1f5284fa0fe14276f68bfc9e094dee07eb10

Contents?: true

Size: 1.19 KB

Versions: 15

Compression:

Stored size: 1.19 KB

Contents

# mdJson 2.0 writer - process step

# History:
#   Stan Smith 2017-03-19 refactored for mdJson/mdTranslator 2.0
#   Josh Bradley original script

require 'jbuilder'
require_relative 'mdJson_timePeriod'
require_relative 'mdJson_responsibleParty'
require_relative 'mdJson_citation'
require_relative 'mdJson_scope'

module ADIWG
   module Mdtranslator
      module Writers
         module MdJson

            module ProcessStep

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

               def self.build(hStep)

                  Jbuilder.new do |json|
                     json.stepId hStep[:stepId]
                     json.description hStep[:description]
                     json.rationale hStep[:rationale]
                     json.timePeriod TimePeriod.build(hStep[:timePeriod]) unless hStep[:timePeriod].empty?
                     json.processor @Namespace.json_map(hStep[:processors], ResponsibleParty)
                     json.reference @Namespace.json_map(hStep[:references], Citation)
                     json.scope Scope.build(hStep[:scope]) unless hStep[:scope].empty?
                  end

               end # build
            end # ProcessStep

         end
      end
   end
end

Version data entries

15 entries across 15 versions & 1 rubygems

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