Class: Pathname
- Extended by:
- Garcon::Pathref
- Defined in:
- lib/garcon/core_ext/pathname.rb
Constant Summary
Constants included from Garcon::Pathref
Class Method Summary collapse
Instance Method Summary collapse
-
#corename ⇒ Pathname
The basename without extension (using self.extname as the extension).
-
#find_all ⇒ Object
Like find, but returns an enumerable.
-
#inspect_compact ⇒ String
Compact string rendering.
Methods included from Garcon::Pathref
of, register_default_paths, register_path, register_paths, relpath_to, unregister_path
Class Method Details
.receive(obj) ⇒ Object
132 133 134 135 |
# File 'lib/garcon/core_ext/pathname.rb', line 132 def self.receive(obj) return obj if obj.nil? obj.is_a?(self) ? obj : new(obj) end |
Instance Method Details
#corename ⇒ Pathname
Returns The basename without extension (using self.extname as the extension).
141 142 143 |
# File 'lib/garcon/core_ext/pathname.rb', line 141 def corename basename(self.extname) end |
#find_all ⇒ Object
Like find, but returns an enumerable
128 129 130 |
# File 'lib/garcon/core_ext/pathname.rb', line 128 def find_all Enumerator.new{|yielder| find{|path| yielder << path } } end |
#inspect_compact ⇒ String
Returns Compact string rendering.
149 |
# File 'lib/garcon/core_ext/pathname.rb', line 149 def inspect_compact() to_path.dump ; end |