lib/pdf_mage/workers/base.rb
def ensure_directory_exists_for_pdf(filename)
        unless string_exists?(filename)
          raise ArgumentError, 'filename must be a string that includes at least 1 ASCII character.'
        end

        directory_path = filename.split('/').slice(0..-2).join('/')
        FileUtils.mkdir_p(directory_path) if string_exists?(directory_path)
        nil
      end
# Creates directories in the filesystem for the given filename, so that writing a file to that location succeeds.
#
# @param [String] filename - string that represents the path the PDF will be created at
# @return [NilClass]
#
# @raise [ArgumentError] if filename is nil or an empty string
Creates directories in the filesystem for the given filename, so that writing a file to that location succeeds.
Creates directories in the filesystem for the given filename so that writing a file to that location succeeds .
def ensure_directory_exists_for_pdf(filename)
        unless string_exists?(filename)
          raise ArgumentError, 'filename must be a string that includes at least 1 ASCII character.'
        end
        directory_path = filename.split('/').slice(0..-2).join('/')
        FileUtils.mkdir_p(directory_path) if string_exists?(directory_path)
        nil
      end
def ensure_directory_exists_for_pdf ( filename ) unless string_exists? ( filename ) raise ArgumentError , 'filename must be a string that includes at least 1 ASCII character.' end directory_path = filename . split ( '/' ) . slice ( 0 .. - 2 ) . join ( '/' ) FileUtils . mkdir_p ( directory_path ) if string_exists? ( directory_path ) nil end
Creates directories in the filesystem for the given filename, so that writing a file to that location succeeds.
Creates directories in the filesystem for the given filename so that writing a file to that location succeeds .
None
NilClass
[ArgumentError] if filename is nil or an empty string
[ ArgumentError ] if filename is nil or an empty string
filename
string that represents the path the PDF will be created at
string that represents the path the PDF will be created at