Method: ChefAPI::Authentication#canonical_path

Defined in:
lib/chef-api/authentication.rb

#canonical_pathString

The canonical path, with duplicate and trailing slashes removed. This value is then hashed.

Examples:

"/zip//zap/foo" #=> "/zip/zap/foo"

Returns:

  • (String)


183
184
185
# File 'lib/chef-api/authentication.rb', line 183

def canonical_path
  @canonical_path ||= hash(@path.squeeze('/').gsub(/(\/)+$/,'')).chomp
end