Class: Pathname

Inherits:
Object show all
Extended by:
Gorillib::Pathref
Defined in:
lib/gorillib/pathname.rb

Constant Summary

Constants included from Gorillib::Pathref

Gorillib::Pathref::ROOT_PATHS

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Gorillib::Pathref

of, register_default_paths, register_path, register_paths, relpath_to, unregister_path

Class Method Details

.receive(obj) ⇒ Object



89
90
91
92
# File 'lib/gorillib/pathname.rb', line 89

def self.receive(obj)
  return obj if obj.nil?
  obj.is_a?(self) ? obj : new(obj)
end

Instance Method Details

#corenameObject

Returns the basename without extension (using self.extname as the extension).

Returns:

  • the basename without extension (using self.extname as the extension)



95
96
97
# File 'lib/gorillib/pathname.rb', line 95

def corename
  basename(self.extname)
end

#inspect_compactString

Returns compact string rendering.

Returns:

  • (String)

    compact string rendering



100
# File 'lib/gorillib/pathname.rb', line 100

def inspect_compact() to_path.dump ; end