Sha256: 5222e17ec5b1de160e908a2f65d6f59435d3d3e490679161b7afcbbfcb3b4d32

Contents?: true

Size: 301 Bytes

Versions: 1

Compression:

Stored size: 301 Bytes

Contents

module Crawler
  module Formatting

    # normalize paths => '/path/to/'
    #
    def normalize_path(path)
      "#{path}/".gsub(/\/+/, '/')
    end

    # constructs a full url from a given uri object
    #
    def construct_url(uri)
      "#{uri.scheme}://#{uri.host}#{uri.path}"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-crawler-0.0.1 lib/crawler/formatting.rb