Sha256: 6aea786304188ecdee260b8ac892601a83548e56daf0c930a7e389e6f9f36fd9

Contents?: true

Size: 530 Bytes

Versions: 1

Compression:

Stored size: 530 Bytes

Contents

module Hanami
  module Utils
    # Ordered file list, consistent across operating systems
    #
    # @since 0.9.0
    module FileList
      # Returns an ordered list of files, consistent across operating systems
      #
      # It has the same signature of <tt>Dir.glob</tt>, it just guarantees to
      # order the results before to return them.
      #
      # @since 0.9.0
      #
      # @see https://ruby-doc.org/core/Dir.html#method-c-glob
      def self.[](*args)
        Dir.glob(*args).sort!
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hanami-utils-1.3.6 lib/hanami/utils/file_list.rb