Class: MasterDataTool::MasterDataFileCollection

Inherits:
Object
  • Object
show all
Defined in:
lib/master_data_tool/master_data_file_collection.rb

Instance Method Summary collapse

Constructor Details

#initialize(spec_name:, override_identifier: nil) ⇒ MasterDataFileCollection

Returns a new instance of MasterDataFileCollection.



5
6
7
8
9
10
11
# File 'lib/master_data_tool/master_data_file_collection.rb', line 5

def initialize(spec_name:, override_identifier: nil)
  @spec_name = spec_name
  @override_identifier = override_identifier
  @collection = build

  freeze
end

Instance Method Details

#eachObject



13
14
15
16
17
18
19
# File 'lib/master_data_tool/master_data_file_collection.rb', line 13

def each
  return enum_for(:each) unless block_given?

  collection.each do |file|
    yield file
  end
end

#to_aObject



21
22
23
# File 'lib/master_data_tool/master_data_file_collection.rb', line 21

def to_a
  each.to_a
end