Sha256: d95ef6ec36023f8c0b5d07e42f513da13d201a8b7715f3a166c80cca9752c4e9

Contents?: true

Size: 359 Bytes

Versions: 4

Compression:

Stored size: 359 Bytes

Contents

# encoding: UTF-8

# Extentions to the core `URI` module
#
module URI
  # Given a URI path, determine whether or no it looks like a directory path
  #
  # @param [String] uri_path
  # @return [Boolean] `true` if the path is empty or has a trailing `/`, otherwise `false`
  #
  def self.directory?(uri_path)
    uri_path.empty? || uri_path[-1] == "/"
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mango-0.6.3 lib/mango/core_ext/uri.rb
mango-0.6.2 lib/mango/core_ext/uri.rb
mango-0.6.1 lib/mango/core_ext/uri.rb
mango-0.6.0 lib/mango/core_ext/uri.rb