Class: Compath::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/compath/cli.rb

Class Method Summary collapse

Class Method Details

.runObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/compath/cli.rb', line 3

def self.run
  finder = Compath::Finder.new
  paths = Compath::PathSorter.sort(finder.paths.keys)

  config = Compath::ConfigLoader.load(File.read('.compath.yml'))

  guides = paths.map {|path| Compath::Guide.new(path) }
  guide_book = Compath::GuideBook.new(guides)
  guide_book.merge(config)

  yaml = guide_book.publish_yaml

  puts yaml
end