Class: Wilbur::CLI

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/wilbur/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



11
12
13
# File 'lib/wilbur/cli.rb', line 11

def source_root
  Wilbur.root.join('catalog_skeleton')
end

Instance Method Details

#initObject



17
18
19
20
21
22
23
24
25
# File 'lib/wilbur/cli.rb', line 17

def init
  Pathname.glob(self.class.source_root.join('**/*'))
    .select { |path| path.file? }
    .map { |path| path.relative_path_from self.class.source_root }
    .delete_if { |path| path == Pathname.new('README.md') }.each do |path|

    template path
  end
end