Class: GoldenRose::CLI::App

Inherits:
Thor
  • Object
show all
Defined in:
lib/golden_rose/cli/app.rb

Instance Method Summary collapse

Instance Method Details

#generate(folder_path) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/golden_rose/cli/app.rb', line 9

def generate(folder_path)
  say("Started formatting report...")
  GoldenRose::generate(folder_path, options[:output])
  say("Report generated in #{options[:output] || Dir.pwd}/index.html", :green)
rescue GoldenRose::GeneratingError => e
  say(e.message, :yellow)
rescue StandardError => e
  say("Error during running generator.", :red)
end