Class: DirTravel::FileEntry
- Defined in:
- lib/dirtravel.rb
Overview
File type entry.
Instance Attribute Summary collapse
-
#basename ⇒ Object
readonly
Returns the value of attribute basename.
-
#suffix ⇒ Object
readonly
Returns the value of attribute suffix.
Attributes inherited from Entry
Instance Method Summary collapse
-
#initialize(name) ⇒ FileEntry
constructor
Set name, suffix, and basename.
Methods inherited from Entry
#abspath, #dir, #files, #parts, #path, #relative?, #rename, #select_level, #stat, #subpath, #tip
Constructor Details
#initialize(name) ⇒ FileEntry
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
#basename ⇒ Object (readonly)
Returns the value of attribute basename.
186 187 188 |
# File 'lib/dirtravel.rb', line 186 def basename @basename end |
#suffix ⇒ Object (readonly)
Returns the value of attribute suffix.
186 187 188 |
# File 'lib/dirtravel.rb', line 186 def suffix @suffix end |