lib/svgeez/builder.rb
def build
      return Svgeez.logger.error(SOURCE_IS_DESTINATION_MESSAGE) if source_is_destination?
      return Svgeez.logger.warn(NO_SVGS_IN_SOURCE_MESSAGE) if source_is_empty?

      Svgeez.logger.info "Generating sprite at `#{destination.file_path}` from #{source.file_paths.length} SVG#{'s' if source.file_paths.length > 1}..."

      # Make destination folder
      FileUtils.mkdir_p(destination.folder_path)

      # Write the file
      File.open(destination.file_path, 'w') do |f|
        f.write destination_file_contents
      end

      Svgeez.logger.info "Successfully generated sprite at `#{destination.file_path}`."
    end
def build
      return Svgeez.logger.error(SOURCE_IS_DESTINATION_MESSAGE) if source_is_destination?
      return Svgeez.logger.warn(NO_SVGS_IN_SOURCE_MESSAGE) if source_is_empty?

      Svgeez.logger.info "Generating sprite at `#{destination.file_path}` from #{source.file_paths.length} SVG#{'s' if source.file_paths.length > 1}..."

      # Make destination folder
      FileUtils.mkdir_p(destination.folder_path)

      # Write the file
      File.open(destination.file_path, 'w') do |f|
        f.write destination_file_contents
      end

      Svgeez.logger.info "Successfully generated sprite at `#{destination.file_path}`."
    end
rubocop:disable Metrics/AbcSize