Sha256: e6349d29af21ec72c3eb7f02388eed9ac3a4d981000a90ea1706282a5b83408e
Contents?: true
Size: 1.41 KB
Versions: 24
Compression:
Stored size: 1.41 KB
Contents
# mdJson 2.0 writer - time period # History: # Stan Smith 2017-03-14 refactored for mdJson/mdTranslator 2.0 # Josh Bradley original script require 'jbuilder' require_relative 'mdJson_identifier' require_relative 'mdJson_dateTime' require_relative 'mdJson_timeInterval' require_relative 'mdJson_duration' module ADIWG module Mdtranslator module Writers module MdJson module TimePeriod def self.build(hTimePeriod) Jbuilder.new do |json| json.id hTimePeriod[:timeId] json.description hTimePeriod[:description] json.identifier Identifier.build(hTimePeriod[:identifier]) unless hTimePeriod[:identifier].empty? json.periodName hTimePeriod[:periodNames] unless hTimePeriod[:periodNames].empty? json.startDateTime DateTime.build(hTimePeriod[:startDateTime]) unless hTimePeriod[:startDateTime].empty? json.endDateTime DateTime.build(hTimePeriod[:endDateTime]) unless hTimePeriod[:endDateTime].empty? json.timeInterval TimeInterval.build(hTimePeriod[:timeInterval]) unless hTimePeriod[:timeInterval].empty? json.duration Duration.build(hTimePeriod[:duration]) unless hTimePeriod[:duration].empty? end end # build end # TimePeriod end end end end
Version data entries
24 entries across 24 versions & 1 rubygems