Sha256: a47a88a6445e6894f7824e8048b9b8c151c8c3af3c894ba8bcccd673475023ef

Contents?: true

Size: 555 Bytes

Versions: 44

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

44 entries across 44 versions & 1 rubygems

Version Path
metanorma-iho-0.6.12 lib/relaton/render/fields.rb
metanorma-iho-0.6.11 lib/relaton/render/fields.rb
metanorma-iho-0.6.10 lib/relaton/render/fields.rb
metanorma-iho-0.6.9 lib/relaton/render/fields.rb