Class: DirTravel::FileEntry
- Inherits:
-
Entry
- Object
- Tree::TreeNode
- Entry
- DirTravel::FileEntry
- Defined in:
- lib/dirtravel.rb
Overview
File type entry.
Instance Attribute Summary (collapse)
-
- (Object) basename
readonly
Returns the value of attribute basename.
-
- (Object) suffix
readonly
Returns the value of attribute suffix.
Attributes inherited from Entry
Instance Method Summary (collapse)
-
- (FileEntry) initialize(name)
constructor
Set name, suffix, and basename.
Methods inherited from Entry
#abspath, #dir, #files, #parts, #path, #relative?, #rename, #select_level, #stat, #subpath, #tip
Constructor Details
- (FileEntry) initialize(name)
Set name, suffix, and basename.
191 192 193 194 195 |
# File 'lib/dirtravel.rb', line 191 def initialize( name ) super( name ) @suffix = File.extname( name ) @basename = File.basename( name, @suffix ) end |
Instance Attribute Details
- (Object) basename (readonly)
Returns the value of attribute basename
186 187 188 |
# File 'lib/dirtravel.rb', line 186 def basename @basename end |
- (Object) suffix (readonly)
Returns the value of attribute suffix
186 187 188 |
# File 'lib/dirtravel.rb', line 186 def suffix @suffix end |