Sha256: 8958960403a856a9dc477657c2570d55c74d9ac105292a5e28c68a12768f8546
Contents?: true
Size: 1.37 KB
Versions: 10
Compression:
Stored size: 1.37 KB
Contents
module RelatonIsoBib class HashConverter < RelatonBib::HashConverter class << self private # # Ovverides superclass's method # # @param item [Hash] # @retirn [RelatonIsoBib::IsoBibliographicItem] def bib_item(item) IsoBibliographicItem.new(item) end # # Ovverides superclass's method # # @param title [Hash] # @return [RelatonBib::TypedTitleString] def typed_title_strig(title) RelatonBib::TypedTitleString.new title end # @param ret [Hash] def editorialgroup_hash_to_bib(ret) eg = ret[:editorialgroup] return unless eg ret[:editorialgroup] = EditorialGroup.new( technical_committee: array(eg[:technical_committee]), subcommittee: array(eg[:subcommittee]), workgroup: array(eg[:workgroup]), secretariat: eg[:secretariat], ) end # @param ret [Hash] def ics_hash_to_bib(ret) ret[:ics] = array(ret[:ics]).map do |ics| ics[:code] ? Ics.new(ics[:code]) : Ics.new(ics) end end # @param ret [Hash] def structuredidentifier_hash_to_bib(ret) return unless ret[:structuredidentifier] ret[:structuredidentifier] = RelatonIsoBib::StructuredIdentifier.new( ret[:structuredidentifier], ) end end end end
Version data entries
10 entries across 10 versions & 2 rubygems