Class: CommonCartridge::Parsers::Items

Inherits:
Object
  • Object
show all
Defined in:
lib/common_cartridge/parsers/items.rb

Instance Method Summary collapse

Constructor Details

#initialize(zipfile, mod, resources) ⇒ Items

Returns a new instance of Items.



4
5
6
7
8
# File 'lib/common_cartridge/parsers/items.rb', line 4

def initialize(zipfile, mod, resources)
  @zipfile = zipfile
  @mod = mod
  @resources = resources
end

Instance Method Details

#parse!Object



10
11
12
13
14
15
16
17
# File 'lib/common_cartridge/parsers/items.rb', line 10

def parse!
  @mod.items.each do |item|
    map_item_to_type(item)
    unless item.items.empty?
      item.items.each { |i| map_item_to_type(i) }
    end
  end
end