Class: Remi::Extractor::FileSystemEntry
- Inherits:
-
Object
- Object
- Remi::Extractor::FileSystemEntry
- Defined in:
- lib/remi/data_subjects/file_system.rb
Overview
Defines properties of an entry in a filesystem.
Instance Attribute Summary collapse
-
#create_time ⇒ Object
readonly
Returns the value of attribute create_time.
-
#modified_time ⇒ Object
readonly
Returns the value of attribute modified_time.
-
#pathname ⇒ Object
readonly
Returns the value of attribute pathname.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
-
#initialize(pathname:, create_time:, modified_time:, raw: nil) ⇒ FileSystemEntry
constructor
A new instance of FileSystemEntry.
-
#name ⇒ String
The base name of the entry.
Constructor Details
#initialize(pathname:, create_time:, modified_time:, raw: nil) ⇒ FileSystemEntry
Returns a new instance of FileSystemEntry.
9 10 11 12 13 14 |
# File 'lib/remi/data_subjects/file_system.rb', line 9 def initialize(pathname:, create_time:, modified_time:, raw: nil) @pathname = Pathname.new(pathname) @create_time = create_time @modified_time = modified_time @raw = raw end |
Instance Attribute Details
#create_time ⇒ Object (readonly)
Returns the value of attribute create_time.
16 17 18 |
# File 'lib/remi/data_subjects/file_system.rb', line 16 def create_time @create_time end |
#modified_time ⇒ Object (readonly)
Returns the value of attribute modified_time.
16 17 18 |
# File 'lib/remi/data_subjects/file_system.rb', line 16 def modified_time @modified_time end |
#pathname ⇒ Object (readonly)
Returns the value of attribute pathname.
16 17 18 |
# File 'lib/remi/data_subjects/file_system.rb', line 16 def pathname @pathname end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
16 17 18 |
# File 'lib/remi/data_subjects/file_system.rb', line 16 def raw @raw end |
Instance Method Details
#name ⇒ String
Returns the base name of the entry.
19 20 21 |
# File 'lib/remi/data_subjects/file_system.rb', line 19 def name @pathname.basename.to_s end |