Class: Ext4::ExtentIndex
- Inherits:
-
Object
- Object
- Ext4::ExtentIndex
- Defined in:
- lib/fs/ext4/extent_index.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#leaf ⇒ Object
readonly
Returns the value of attribute leaf.
Instance Method Summary collapse
- #dump ⇒ Object
-
#initialize(buf) ⇒ ExtentIndex
constructor
A new instance of ExtentIndex.
Constructor Details
#initialize(buf) ⇒ ExtentIndex
Returns a new instance of ExtentIndex.
18 19 20 21 22 23 24 |
# File 'lib/fs/ext4/extent_index.rb', line 18 def initialize(buf) raise "Ext4::ExtentIndex.initialize: Nil buffer" if buf.nil? @ei = EXTENT_INDEX.decode(buf) @block = @ei['block'] @leaf = (@ei['leaf_hi'] << 32) | @ei['leaf_lo'] end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
16 17 18 |
# File 'lib/fs/ext4/extent_index.rb', line 16 def block @block end |
#leaf ⇒ Object (readonly)
Returns the value of attribute leaf.
16 17 18 |
# File 'lib/fs/ext4/extent_index.rb', line 16 def leaf @leaf end |
Instance Method Details
#dump ⇒ Object
26 27 28 29 30 31 |
# File 'lib/fs/ext4/extent_index.rb', line 26 def dump out = "\#<#{self.class}:0x#{'%08x' % object_id}>\n" out += "Block : #{@block}\n" out += "Leaf : #{@leaf}\n" out end |