class RelatonIsoBib::HashConverter
Private Class Methods
bib_item(item)
click to toggle source
Ovverides superclass's method
@param item [Hash] @retirn [RelatonIsoBib::IsoBibliographicItem]
# File lib/relaton_iso_bib/hash_converter.rb, line 11 def bib_item(item) IsoBibliographicItem.new(**item) end
editorialgroup_hash_to_bib(ret)
click to toggle source
@param ret [Hash]
# File lib/relaton_iso_bib/hash_converter.rb, line 25 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
ics_hash_to_bib(ret)
click to toggle source
@param ret [Hash]
# File lib/relaton_iso_bib/hash_converter.rb, line 38 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
structuredidentifier_hash_to_bib(ret)
click to toggle source
@param ret [Hash]
# File lib/relaton_iso_bib/hash_converter.rb, line 45 def structuredidentifier_hash_to_bib(ret) return unless ret[:structuredidentifier] ret[:structuredidentifier] = RelatonIsoBib::StructuredIdentifier.new(**ret[:structuredidentifier]) end
typed_title_strig(title)
click to toggle source
Ovverides superclass's method
@param title [Hash] @return [RelatonBib::TypedTitleString]
# File lib/relaton_iso_bib/hash_converter.rb, line 20 def typed_title_strig(title) RelatonBib::TypedTitleString.new(**title) end