Class: Nanoc::CLI::Commands::Check Private
- Inherits:
-
Nanoc::CLI::CommandRunner
- Object
- Cri::CommandRunner
- Nanoc::CLI::CommandRunner
- Nanoc::CLI::Commands::Check
- Defined in:
- lib/nanoc/cli/commands/check.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #run ⇒ Object private
Methods inherited from Nanoc::CLI::CommandRunner
#call, #debug?, #in_site_dir?, #load_site, #site, #site=
Instance Method Details
#run ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/nanoc/cli/commands/check.rb', line 13 def run load_site(preprocess: true) runner = Nanoc::Extra::Checking::Runner.new(site) if [:list] runner.list_checks return end success = if [:all] runner.run_all elsif [:deploy] runner.run_for_deploy else runner.run_specific(arguments) end unless success raise Nanoc::Int::Errors::GenericTrivial, 'One or more checks failed' end end |