Sha256: 35daafd756ced357a289bf767ef2874cff0529a17046ca5d83e8686bc007ddc6

Contents?: true

Size: 369 Bytes

Versions: 1

Compression:

Stored size: 369 Bytes

Contents

# frozen_string_literal: true

require "fileutils"

module TrailblazerWizard
  class FileHelper
    def self.mkdir(filename)
      dirs = filename.split "/"

      composite = []
      (dirs - [dirs.last]).each do |dir|
        composite << dir

        next if File.exist?(composite.join("/"))

        FileUtils.mkdir(composite.join("/"))
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
trailblazer-wizard-0.0.6 lib/trailblazer_wizard/file_helper.rb