Class: PEdump::NE::ResourceGroup

Inherits:
Object
  • Object
show all
Defined in:
lib/pedump/ne.rb

Class Method Summary collapse

Class Method Details

.read(io) ⇒ Object



129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/pedump/ne.rb', line 129

def self.read io
  super.tap do |g|
    if g.type_id.to_i == 0
      # type_id = 0 means end of resource groups
      return nil
    else
      # read only if type_id is non-zero,
      g.children = []
      g.count.times do
        break if io.eof?
        g.children << ResourceInfo.read(io)
      end
    end
  end
end