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, StackProfProfiler, 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
394 395 396 397 |
# File 'lib/nanoc/cli/commands/compile.rb', line 394 def initialize(, arguments, command) super @listener_classes = default_listener_classes end |
Instance Attribute Details
#listener_classes ⇒ Object
Returns the value of attribute listener_classes
392 393 394 |
# File 'lib/nanoc/cli/commands/compile.rb', line 392 def listener_classes @listener_classes end |
Instance Method Details
#run ⇒ Object
399 400 401 402 403 404 405 406 407 408 409 410 411 412 |
# File 'lib/nanoc/cli/commands/compile.rb', line 399 def run time_before = Time.now load_site puts 'Compiling siteā¦' run_listeners_while do site.compile end time_after = Time.now puts puts "Site compiled in #{format('%.2f', time_after - time_before)}s." end |