Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/filepath/core_ext/string.rb

Instance Method Summary collapse

Instance Method Details

#as_pathFilePath

Note:

FIXME: #as_path should be #to_path but that method name is already used

Generates a path from a String.

"/a/b/c".as_path is equivalent to FilePath.new("/a/b/c").

Examples:

FilePath from a string


"/etc/ssl/certs".as_path #=> </etc/ssl/certs>

Returns:

  • (FilePath)

    a new path generated from the string



19
20
21
# File 'lib/filepath/core_ext/string.rb', line 19

def as_path
	FilePath.new(self)
end