Class: DirTravel::DirEntry

Inherits:
Entry
  • Object
show all
Defined in:
lib/dirtravel.rb

Overview

Directory type entry.

Instance Attribute Summary

Attributes inherited from Entry

#name

Instance Method Summary collapse

Methods inherited from Entry

#abspath, #dir, #files, #parts, #path, #relative?, #rename, #select_level, #stat, #subpath, #tip

Constructor Details

#initialize(name, abspath = nil) ⇒ DirEntry

Set name and abspath if given.

Parameters:

  • name (String)

    Directory name.

  • abspath (String) (defaults to: nil)

    Set abspath if given. Otherwise it is generated from pieces.



174
175
176
177
178
179
# File 'lib/dirtravel.rb', line 174

def initialize( name, abspath = nil )
    super( name )
    if abspath
        @abspath = abspath
    end
end