Class: NdrImport::UniversalImporterHelper::TableEnumProxy
- Inherits:
-
Object
- Object
- NdrImport::UniversalImporterHelper::TableEnumProxy
- Includes:
- Enumerable
- Defined in:
- lib/ndr_import/universal_importer_helper.rb
Overview
Helper class to allow multiple source enumerators to contribute to one overall table.
Instance Method Summary collapse
- #add_table_enum(table_enum) ⇒ Object
- #each(&block) ⇒ Object
-
#initialize ⇒ TableEnumProxy
constructor
A new instance of TableEnumProxy.
Constructor Details
#initialize ⇒ TableEnumProxy
Returns a new instance of TableEnumProxy.
14 15 16 |
# File 'lib/ndr_import/universal_importer_helper.rb', line 14 def initialize @table_enums = [] end |
Instance Method Details
#add_table_enum(table_enum) ⇒ Object
18 19 20 |
# File 'lib/ndr_import/universal_importer_helper.rb', line 18 def add_table_enum(table_enum) @table_enums << table_enum end |
#each(&block) ⇒ Object
22 23 24 25 26 |
# File 'lib/ndr_import/universal_importer_helper.rb', line 22 def each(&block) return enum_for(:each) unless block @table_enums.each { |table_enum| table_enum.each(&block) } end |