Class: Relaton::Render::IHO::Fields

Inherits:
Fields
  • Object
show all
Defined in:
lib/relaton/render/fields.rb

Instance Method Summary collapse

Instance Method Details

#edition_fields_format(hash) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/relaton/render/fields.rb', line 5

def edition_fields_format(hash)
  super
  hash[:publisher_raw]&.any? do |p|
    ["IHO", "International Hydrographic Organization"]
      .include?(p[:nonpersonal])
  end or hash[:edition] = nil
end

#misc_fields_format(hash) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/relaton/render/fields.rb', line 13

def misc_fields_format(hash)
  super
  hash[:authoritative_identifier].map! do |x|
    x.sub(/^IHO /, "")
  end
  hash
end