Method: RelatonGb::GbBibliographicItem#to_hash

Defined in:
lib/relaton_gb/gb_bibliographic_item.rb

#to_hashHash

Returns:

  • (Hash)


77
78
79
80
81
82
83
84
# File 'lib/relaton_gb/gb_bibliographic_item.rb', line 77

def to_hash # rubocop:disable Metrics/AbcSize
  hash = super
  hash["ext"]["ccs"] = single_element_array(ccs) if ccs&.any?
  hash["ext"]["committee"] = committee.to_hash if committee
  hash["ext"]["plannumber"] = gbplannumber if gbplannumber
  hash["ext"]["gbtype"] = gbtype.to_hash if gbtype
  hash
end