Sha256: 21683b918e2595a422408bc936ee9b211a68cf845d23eeb5fe50ddc5f62c423f

Contents?: true

Size: 419 Bytes

Versions: 1

Compression:

Stored size: 419 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

1 entries across 1 versions & 1 rubygems

Version Path
master_data_tool-0.23.0 lib/master_data_tool/master_data_collection.rb