Class: Resilience::FSDir::DirEntry
- Inherits:
-
Object
- Object
- Resilience::FSDir::DirEntry
- Defined in:
- lib/resilience/fs_dir/dir_entry.rb
Instance Attribute Summary collapse
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#name ⇒ Object
Returns the value of attribute name.
-
#prefix ⇒ Object
Returns the value of attribute prefix.
-
#record ⇒ Object
metadata record.
Instance Method Summary collapse
- #disk_offset ⇒ Object
- #fullname ⇒ Object
-
#initialize(args = {}) ⇒ DirEntry
constructor
A new instance of DirEntry.
Constructor Details
#initialize(args = {}) ⇒ DirEntry
Returns a new instance of DirEntry.
17 18 19 20 21 22 |
# File 'lib/resilience/fs_dir/dir_entry.rb', line 17 def initialize(args={}) @prefix = args[:prefix] @name = args[:name] @metadata = args[:metadata] @record = args[:record] end |
Instance Attribute Details
#metadata ⇒ Object
Returns the value of attribute metadata.
12 13 14 |
# File 'lib/resilience/fs_dir/dir_entry.rb', line 12 def @metadata end |
#name ⇒ Object
Returns the value of attribute name.
11 12 13 |
# File 'lib/resilience/fs_dir/dir_entry.rb', line 11 def name @name end |
#prefix ⇒ Object
Returns the value of attribute prefix.
10 11 12 |
# File 'lib/resilience/fs_dir/dir_entry.rb', line 10 def prefix @prefix end |
#record ⇒ Object
metadata record
15 16 17 |
# File 'lib/resilience/fs_dir/dir_entry.rb', line 15 def record @record end |
Instance Method Details
#disk_offset ⇒ Object
28 29 30 |
# File 'lib/resilience/fs_dir/dir_entry.rb', line 28 def disk_offset image.offset + dir.record.attribute.pos end |
#fullname ⇒ Object
24 25 26 |
# File 'lib/resilience/fs_dir/dir_entry.rb', line 24 def fullname "#{prefix}\\#{name}" end |