Sha256: 356a4ddccbf4bc1d6590030aa065f509bb7a025989603b891ebaa52c522135e0

Contents?: true

Size: 373 Bytes

Versions: 44

Compression:

Stored size: 373 Bytes

Contents

module Relaton
  module Render
    module IHO
      class Parse < ::Relaton::Render::Parse
        def uri(doc)
          uri = nil
          %w(src).each do |t|
            uri = doc.link.detect { |u| u.type == t } and break
          end
          uri ||= doc.link.first
          return nil unless uri

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