class R2OAS::Schema::V3::BaseCleaner

Public Instance Methods

clean_docs() { |save_file_path(type: :relative)| ... } click to toggle source
# File lib/r2-oas/schema/v3/cleaner/base_cleaner.rb, line 10
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 Instance Methods

clean_target_files() click to toggle source
# File lib/r2-oas/schema/v3/cleaner/base_cleaner.rb, line 24
def clean_target_files
  raise 'Please implement in inherited class.'
end
many_paths_file_paths() click to toggle source
# File lib/r2-oas/schema/v3/cleaner/base_cleaner.rb, line 20
def many_paths_file_paths
  Dir.glob("#{schema_save_dir_path}/paths/**/**.yml")
end