Class: Zena::FoxyZipsParser
- Inherits:
-
FoxyParser
- Object
- FoxyParser
- Zena::FoxyZipsParser
- Defined in:
- lib/zena/foxy_parser.rb
Instance Attribute Summary
Attributes inherited from FoxyParser
#column_names, #defaults, #name, #site, #table
Instance Method Summary collapse
-
#initialize(table_name, opts = {}) ⇒ FoxyZipsParser
constructor
A new instance of FoxyZipsParser.
- #run ⇒ Object
Methods inherited from FoxyParser
#all_elements, dump_fixtures, id, multi_site_id, multi_site_tables, new, o_new, parses, path_for_table, #path_for_table, prelude, records_to_yaml, #sites
Constructor Details
#initialize(table_name, opts = {}) ⇒ FoxyZipsParser
Returns a new instance of FoxyZipsParser.
846 847 848 849 |
# File 'lib/zena/foxy_parser.rb', line 846 def initialize(table_name, opts = {}) super @zip_counter = opts[:nodes].zip_counter end |
Instance Method Details
#run ⇒ Object
851 852 853 854 855 856 857 858 859 860 |
# File 'lib/zena/foxy_parser.rb', line 851 def run sites.each do |site| @inserted_keys = [] out "" out "#{site}:" out_pair('site_id', Zena::FoxyParser::multi_site_id(site)) out_pair('zip', @zip_counter[site]) end @file.close if @file end |