Class: Suma::Cli

Inherits:
Thor
  • Object
show all
Extended by:
ThorExt::Start
Defined in:
lib/suma/cli.rb

Instance Method Summary collapse

Methods included from ThorExt::Start

extended, start

Instance Method Details

#build(metanorma_site_manifest) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/suma/cli.rb', line 19

def build(metanorma_site_manifest)
  unless File.exist?(metanorma_site_manifest)
    raise Errno::ENOENT, "Specified Metanorma site manifest file " \
      "`#{metanorma_site_manifest}` not found."
  end

  begin
    run(metanorma_site_manifest, options)
  rescue StandardError => e
    log_error(e)
  end
end