Sha256: 0adda4467714381e243c4080eef20332c78f046f3f30a266eef30c5980b836cb
Contents?: true
Size: 874 Bytes
Versions: 7
Compression:
Stored size: 874 Bytes
Contents
module RelatonIho class HashConverter < RelatonBib::HashConverter class << self # @override RelatonIsoBib::HashConverter.hash_to_bib # @param args [Hash] # @param nested [TrueClass, FalseClass] # @return [Hash] def hash_to_bib(args, nested = false) ret = super return if ret.nil? commentperiod_hash_to_bib ret ret end private # @param ret [Hash] def commentperiod_hash_to_bib(ret) ret[:commentperiod] &&= CommentPeriond.new(ret[:commentperiod]) end # @param ret [Hash] def editorialgroup_hash_to_bib(ret) eg = ret[:editorialgroup] return unless eg.is_a?(Hash) || eg&.any? collection = array(eg).map { |g| EditorialGroup.new g } ret[:editorialgroup] = EditorialGroupCollection.new collection end end end end
Version data entries
7 entries across 7 versions & 2 rubygems