Class: Wardite::ImportSection

Inherits:
Section
  • Object
show all
Defined in:
lib/wardite.rb

Defined Under Namespace

Classes: ImportDesc

Instance Attribute Summary collapse

Attributes inherited from Section

#code, #name, #size

Instance Method Summary collapse

Constructor Details

#initializeImportSection

: void



151
152
153
154
155
156
# File 'lib/wardite.rb', line 151

def initialize #: void
  self.name = "Import"
  self.code = 0x2

  @imports = []
end

Instance Attribute Details

#importsObject

: Array



149
150
151
# File 'lib/wardite.rb', line 149

def imports
  @imports
end

Instance Method Details

#add_desc(&blk) ⇒ Object



159
160
161
162
163
# File 'lib/wardite.rb', line 159

def add_desc(&blk)
  desc = ImportDesc.new
  blk.call(desc) if blk
  self.imports << desc
end