Sha256: 500a6e1c92270d9d3d6793787b7e7c932f72ca347369b64bf04b70a61644ce8a
Contents?: true
Size: 692 Bytes
Versions: 2
Compression:
Stored size: 692 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 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
r2-oas-0.1.2 | lib/r2-oas/schema/v3/cleaner/base_cleaner.rb |
r2-oas-0.1.0 | lib/r2-oas/schema/v3/cleaner/base_cleaner.rb |