Class: Nanoc::CLI::Commands::Compile
- Inherits:
-
Nanoc::CLI::CommandRunner
- Object
- Cri::CommandRunner
- Nanoc::CLI::CommandRunner
- Nanoc::CLI::Commands::Compile
- Defined in:
- lib/nanoc/cli/commands/compile.rb
Defined Under Namespace
Classes: DebugPrinter, DiffGenerator, FileActionPrinter, GCController, Listener, TimingRecorder
Instance Attribute Summary collapse
-
#listener_classes ⇒ Object
Returns the value of attribute listener_classes.
Instance Method Summary collapse
-
#initialize(options, arguments, command) ⇒ Compile
constructor
A new instance of Compile.
-
#run ⇒ Object
Constructor Details
#initialize(options, arguments, command) ⇒ Compile
Returns a new instance of Compile
355 356 357 358 |
# File 'lib/nanoc/cli/commands/compile.rb', line 355 def initialize(, arguments, command) super @listener_classes = default_listener_classes end |
Instance Attribute Details
#listener_classes ⇒ Object
Returns the value of attribute listener_classes
353 354 355 |
# File 'lib/nanoc/cli/commands/compile.rb', line 353 def listener_classes @listener_classes end |
Instance Method Details
#run ⇒ Object
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 |
# File 'lib/nanoc/cli/commands/compile.rb', line 360 def run time_before = Time.now load_site puts 'Compiling siteā¦' run_listeners_while do site.compile prune end time_after = Time.now puts puts "Site compiled in #{format('%.2f', time_after - time_before)}s." end |