Sha256: ee36091059cd33b301f0db864498589c925018705dacdbafcde3038268d0a35d
Contents?: true
Size: 1.46 KB
Versions: 27
Compression:
Stored size: 1.46 KB
Contents
# mdJson 2.0 writer - process step # History: # Stan Smith 2017-08-30 add support for process step sources and products # 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' require_relative 'mdJson_source' 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.stepSource @Namespace.json_map(hStep[:stepSources], Source) json.stepProduct @Namespace.json_map(hStep[:stepProducts], Source) json.scope Scope.build(hStep[:scope]) unless hStep[:scope].empty? end end # build end # ProcessStep end end end end
Version data entries
27 entries across 27 versions & 1 rubygems