Class: Papers::CLI

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

Instance Method Summary collapse

Instance Method Details

#runObject



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/papers/cli.rb', line 7

def run
  if options[:generate]
    begin
      Papers::ManifestGenerator.new.generate!
    rescue Papers::FileExistsError => e
      warn "Error: 'papers_manifest.yml' already exists at '#{e.message}'. Aborting..."
    end
  end

  if options[:update]
    Papers::ManifestUpdater.new.update!
  end
end