Class: Wardite::ImportSection

Inherits:
Section
  • Object
show all
Defined in:
lib/wardite/load.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



214
215
216
217
218
219
# File 'lib/wardite/load.rb', line 214

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

  @imports = []
end

Instance Attribute Details

#importsObject

: Array



212
213
214
# File 'lib/wardite/load.rb', line 212

def imports
  @imports
end

Instance Method Details

#add_desc(&blk) ⇒ Object



222
223
224
225
226
# File 'lib/wardite/load.rb', line 222

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