Sha256: 5bea9dd32bd4547fbba8c07ad5df6e751c321b3afebd46166d117c6bd0d88933
Contents?: true
Size: 709 Bytes
Versions: 10
Compression:
Stored size: 709 Bytes
Contents
# frozen_string_literal: true require 'r2-oas/schema/v3/base' require 'r2-oas/schema/v3/manager/file_manager' module R2OAS module Schema module V3 class BaseCleaner < Base def clean_docs clean_target_files.each do |file_path| file_manager = FileManager.new(file_path, :full) file_manager.delete yield file_manager.save_file_path(type: :relative) if block_given? end end private def many_paths_file_paths Dir.glob("#{schema_save_dir_path}/paths/**/**.yml") end def clean_target_files raise 'Please implement in inherited class.' end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems