Sha256: bc0d6da8f39cc97401f622d13baf48d4e38c75df3dc763b9e8fffc209dcb400f

Contents?: true

Size: 374 Bytes

Versions: 26

Compression:

Stored size: 374 Bytes

Contents

require "pathname"

module Metanorma
  module Output
    module Utils
      class << self
        def file_path(url_path)
          file_url = url_path
          file_url = "file://#{url_path}" if Pathname.new(file_url).absolute?
          file_url = "file://#{Dir.pwd}/#{url_path}" unless %r{^file://} =~ file_url
          file_url
        end
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
metanorma-1.3.1 lib/metanorma/output/utils.rb
metanorma-1.3.0 lib/metanorma/output/utils.rb
metanorma-1.2.8 lib/metanorma/output/utils.rb
metanorma-1.2.7 lib/metanorma/output/utils.rb
metanorma-1.2.6 lib/metanorma/output/utils.rb
metanorma-1.2.6pre lib/metanorma/output/utils.rb
metanorma-1.2.5 lib/metanorma/output/utils.rb
metanorma-1.2.4 lib/metanorma/output/utils.rb
metanorma-1.2.3 lib/metanorma/output/utils.rb
metanorma-1.2.2 lib/metanorma/output/utils.rb
metanorma-1.2.1 lib/metanorma/output/utils.rb
metanorma-1.2.0 lib/metanorma/output/utils.rb
metanorma-1.1.7 lib/metanorma/output/utils.rb
metanorma-1.1.6 lib/metanorma/output/utils.rb
metanorma-1.1.5 lib/metanorma/output/utils.rb
metanorma-1.1.4 lib/metanorma/output/utils.rb
metanorma-1.1.3 lib/metanorma/output/utils.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/metanorma-1.1.2/lib/metanorma/output/utils.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/metanorma-1.1.2/lib/metanorma/output/utils.rb
metanorma-1.1.2 lib/metanorma/output/utils.rb