Sha256: 0cb9e9cd52aec0b0f83b370e1a022f4f8e6c554465468b109ce9a6514053e5f8

Contents?: true

Size: 555 Bytes

Versions: 4

Compression:

Stored size: 555 Bytes

Contents

module Relaton
  module Render
    module Iho
      class Fields < ::Relaton::Render::Fields
        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

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
metanorma-iho-1.0.8 lib/relaton/render/fields.rb
metanorma-iho-1.0.7 lib/relaton/render/fields.rb
metanorma-iho-1.0.6 lib/relaton/render/fields.rb
metanorma-iho-1.0.5 lib/relaton/render/fields.rb