Class: Pandocomatic::SummaryPrinter
- Defined in:
- lib/pandocomatic/printer/summary_printer.rb
Overview
Printer for printing a summary of the conversion process in non-quiet mode
Direct Known Subclasses
Instance Method Summary collapse
-
#commands ⇒ String
A string representation of the commands being executed.
-
#initialize(command, configuration) ⇒ SummaryPrinter
constructor
Create a new SummaryPrinter.
-
#output? ⇒ Boolean
Is there an output file?.
Methods inherited from Printer
Constructor Details
#initialize(command, configuration) ⇒ SummaryPrinter
Create a new SummaryPrinter
pandocomatic invokation
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/pandocomatic/printer/summary_printer.rb', line 31 def initialize(command, configuration) super('summary.txt') @command = command @input = configuration.input.to_s @output = if configuration.stdout? nil else configuration.output end @config_files = configuration.config_files end |
Instance Method Details
#commands ⇒ String
A string representation of the commands being executed
47 48 49 |
# File 'lib/pandocomatic/printer/summary_printer.rb', line 47 def commands "#{@command.count} command#{'s' if @command.count != 1}" end |
#output? ⇒ Boolean
Is there an output file?
55 56 57 |
# File 'lib/pandocomatic/printer/summary_printer.rb', line 55 def output? !@output.nil? and !@output.empty? end |