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-1.0.4 lib/relaton/render/fields.rb
metanorma-iho-1.0.3 lib/relaton/render/fields.rb
metanorma-iho-1.0.2 lib/relaton/render/fields.rb
metanorma-iho-1.0.1 lib/relaton/render/fields.rb
metanorma-iho-1.0.0 lib/relaton/render/fields.rb
metanorma-iho-0.9.12 lib/relaton/render/fields.rb
metanorma-iho-0.9.11 lib/relaton/render/fields.rb
metanorma-iho-0.9.9 lib/relaton/render/fields.rb
metanorma-iho-0.9.8 lib/relaton/render/fields.rb
metanorma-iho-0.9.7 lib/relaton/render/fields.rb
metanorma-iho-0.9.6 lib/relaton/render/fields.rb
metanorma-iho-0.9.5 lib/relaton/render/fields.rb
metanorma-iho-0.9.4 lib/relaton/render/fields.rb
metanorma-iho-0.9.3 lib/relaton/render/fields.rb
metanorma-iho-0.9.2 lib/relaton/render/fields.rb
metanorma-iho-0.9.1 lib/relaton/render/fields.rb
metanorma-iho-0.9.0 lib/relaton/render/fields.rb
metanorma-iho-0.8.7 lib/relaton/render/fields.rb
metanorma-iho-0.8.5 lib/relaton/render/fields.rb
metanorma-iho-0.8.4 lib/relaton/render/fields.rb