Class: Nanoc::CLI::Commands::ShowRules

Inherits:
Nanoc::CLI::CommandRunner show all
Defined in:
lib/nanoc/cli/commands/show-rules.rb

Instance Method Summary (collapse)

Methods inherited from Nanoc::CLI::CommandRunner

#call, call, #debug?, #is_in_site_dir?, #load_site, #require_site, #site

Instance Method Details

- (Object) run



14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/nanoc/cli/commands/show-rules.rb', line 14

def run
  require_site

  @c    = Nanoc::CLI::ANSIStringColorizer
  @calc = site.compiler.rule_memory_calculator

  # TODO explain /foo/
  # TODO explain content/foo.html
  # TODO explain output/foo/index.html

  site.items.each   { |i| explain_item(i)   }
  site.layouts.each { |l| explain_layout(l) }
end