Sha256: 8bf5c4eae379f9f73e569ae36dbe17c0f8d87e77da33569f23652df4f07d2c3d

Contents?: true

Size: 418 Bytes

Versions: 8

Compression:

Stored size: 418 Bytes

Contents

# frozen_string_literal: true

module MasterDataTool
  class MasterDataCollection
    def initialize
      @collection = []
    end

    def append(master_data)
      @collection << master_data
    end

    def each
      return enum_for(:each) unless block_given?

      @collection.sort_by(&:basename).each do |master_data|
        yield master_data
      end
    end

    def to_a
      each.to_a
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
master_data_tool-0.22.0 lib/master_data_tool/master_data_collection.rb
master_data_tool-0.21.1 lib/master_data_tool/master_data_collection.rb
master_data_tool-0.21.0 lib/master_data_tool/master_data_collection.rb
master_data_tool-0.20.0 lib/master_data_tool/master_data_collection.rb
master_data_tool-0.19.1 lib/master_data_tool/master_data_collection.rb
master_data_tool-0.19.0 lib/master_data_tool/master_data_collection.rb
master_data_tool-0.18.0 lib/master_data_tool/master_data_collection.rb
master_data_tool-0.17.0 lib/master_data_tool/master_data_collection.rb