Module: URI

Defined in:
lib/mango/core_ext/uri.rb

Overview

Extentions to the core URI module

Class Method Summary collapse

Class Method Details

.directory?(uri_path) ⇒ Boolean

Given a URI path, determine whether or no it looks like a directory path

Parameters:

Returns:

  • (Boolean)

    true if the path is empty or has a trailing /, otherwise false



9
10
11
# File 'lib/mango/core_ext/uri.rb', line 9

def self.directory?(uri_path)
  uri_path.empty? || uri_path[-1] == "/"
end