Class: StringTable

Inherits:
Base
  • Object
show all
Defined in:
lib/elfcat/stringtable.rb

Instance Attribute Summary

Attributes inherited from Base

#data

Instance Method Summary collapse

Methods inherited from Base

#[], #method_missing, #parse_slice, #parse_struct

Constructor Details

#initialize(_st) ⇒ StringTable

Returns a new instance of StringTable.



2
3
4
5
# File 'lib/elfcat/stringtable.rb', line 2

def initialize _st
  super()
  parse _st
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Base

Instance Method Details

#debugObject



7
8
9
10
11
12
13
14
# File 'lib/elfcat/stringtable.rb', line 7

def debug
  @data.each_with_index do |x, i|
    index_s = sprintf("%4d", i)
    name_s = sprintf("%s", x)

    puts "#{index_s} | #{name_s}"
  end
end