module VanishingVision

Constants

VERSION

Public Class Methods

vanish(target_path, options = {}) click to toggle source
# File lib/vanishing_vision.rb, line 8
def vanish(target_path, options = {})
  target = Pathname(target_path)

  if target.file?
    Engine.new(target).run(options[:auto_correct])
  else
    Dir[target.join('**/*')].each do |path|
      next if File.directory?(path)

      Engine.new(path).run(options[:auto_correct])
    end
  end
end

Private Instance Methods

vanish(target_path, options = {}) click to toggle source
# File lib/vanishing_vision.rb, line 8
def vanish(target_path, options = {})
  target = Pathname(target_path)

  if target.file?
    Engine.new(target).run(options[:auto_correct])
  else
    Dir[target.join('**/*')].each do |path|
      next if File.directory?(path)

      Engine.new(path).run(options[:auto_correct])
    end
  end
end