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



231
232
233
234
235
236
# File 'lib/wardite/load.rb', line 231

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

  @imports = []
end

Instance Attribute Details

#importsObject

: Array



229
230
231
# File 'lib/wardite/load.rb', line 229

def imports
  @imports
end

Instance Method Details

#add_desc(&blk) ⇒ Object



239
240
241
242
243
# File 'lib/wardite/load.rb', line 239

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