Module: Deadlink

Defined in:
lib/deadlink.rb,
lib/deadlink/path.rb,
lib/deadlink/paths.rb,
lib/deadlink/md_file.rb,
lib/deadlink/scanner.rb,
lib/deadlink/version.rb,
lib/deadlink/md_files.rb,
lib/deadlink/decorator.rb

Defined Under Namespace

Classes: Decorator, MdFile, MdFiles, Path, Paths, Scanner

Constant Summary collapse

VERSION =
"0.6.3"

Class Method Summary collapse

Class Method Details

.scanObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/deadlink.rb', line 13

def self.scan()

  opts = ARGV.getopts('','p')
  target_path = ARGV[0]

  scanner = Scanner.new(target_path)

  unless scanner.valid?
    exit 1
  end

  files = scanner.md_files

  if files.empty?
    exit 0
  end

  paths = scanner.paths(files)
  paths.print_deadlinks(opts)
end