Class: Relaton3gpp::HashConverter

Inherits:
RelatonBib::HashConverter
  • Object
show all
Defined in:
lib/relaton_3gpp/hash_converter.rb

Class Method Summary collapse

Class Method Details

.bib_item(item_hash) ⇒ Relaton3gpp::BibliographicItem

Parameters:

  • item_hash (Hash)

Returns:



16
17
18
# File 'lib/relaton_3gpp/hash_converter.rb', line 16

def bib_item(item_hash)
  BibliographicItem.new(**item_hash)
end

.hash_to_bib(args, nested = false) ⇒ Object



4
5
6
7
8
# File 'lib/relaton_3gpp/hash_converter.rb', line 4

def hash_to_bib(args, nested = false)
  hash = super
  release_hash_to_bib(hash)
  hash
end

.release_hash_to_bib(hash) ⇒ Object



10
11
12
# File 'lib/relaton_3gpp/hash_converter.rb', line 10

def release_hash_to_bib(hash)
  hash[:release] &&= Release.new(**hash[:release])
end