Class: Ext4::ExtentHeader
- Inherits:
-
Object
- Object
- Ext4::ExtentHeader
- Defined in:
- lib/fs/ext4/extent_header.rb
Instance Attribute Summary collapse
-
#depth ⇒ Object
readonly
Returns the value of attribute depth.
-
#entries ⇒ Object
readonly
Returns the value of attribute entries.
-
#generation ⇒ Object
readonly
Returns the value of attribute generation.
-
#magic ⇒ Object
readonly
Returns the value of attribute magic.
-
#max ⇒ Object
readonly
Returns the value of attribute max.
Instance Method Summary collapse
- #dump ⇒ Object
-
#initialize(buf) ⇒ ExtentHeader
constructor
A new instance of ExtentHeader.
Constructor Details
#initialize(buf) ⇒ ExtentHeader
Returns a new instance of ExtentHeader.
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/fs/ext4/extent_header.rb', line 19 def initialize(buf) raise "Ext4::ExtentHeader.initialize: Nil buffer" if buf.nil? @eh = EXTENT_HEADER.decode(buf) @magic = @eh['magic'] @entries = @eh['entries'] @max = @eh['max'] @depth = @eh['depth'] @generation = @eh['generation'] end |
Instance Attribute Details
#depth ⇒ Object (readonly)
Returns the value of attribute depth.
17 18 19 |
# File 'lib/fs/ext4/extent_header.rb', line 17 def depth @depth end |
#entries ⇒ Object (readonly)
Returns the value of attribute entries.
17 18 19 |
# File 'lib/fs/ext4/extent_header.rb', line 17 def entries @entries end |
#generation ⇒ Object (readonly)
Returns the value of attribute generation.
17 18 19 |
# File 'lib/fs/ext4/extent_header.rb', line 17 def generation @generation end |
#magic ⇒ Object (readonly)
Returns the value of attribute magic.
17 18 19 |
# File 'lib/fs/ext4/extent_header.rb', line 17 def magic @magic end |
#max ⇒ Object (readonly)
Returns the value of attribute max.
17 18 19 |
# File 'lib/fs/ext4/extent_header.rb', line 17 def max @max end |
Instance Method Details
#dump ⇒ Object
30 31 32 33 34 35 36 37 38 |
# File 'lib/fs/ext4/extent_header.rb', line 30 def dump out = "\#<#{self.class}:0x#{'%08x' % object_id}>\n" out += "Magic : #{@magic}\n" out += "Entries : #{@entries}\n" out += "Max : #{@max}\n" out += "Depth : #{@depth}\n" out += "Generation : #{@generation}\n" out end |