Class: Pandocomatic::UnknownErrorPrinter

Inherits:
Printer
  • Object
show all
Defined in:
lib/pandocomatic/printer/unknown_error_printer.rb

Overview

Printer for Errors in non-quiet mode

Instance Method Summary collapse

Methods inherited from Printer

#template, #to_s

Constructor Details

#initialize(error) ⇒ UnknownErrorPrinter

Create a new ErrorPrinter



27
28
29
30
31
# File 'lib/pandocomatic/printer/unknown_error_printer.rb', line 27

def initialize(error)
  template = 'unknown_error.txt'
  super(template)
  @error = error
end

Instance Method Details

Print an Error to STDERR rather than STDOUT



34
35
36
37
# File 'lib/pandocomatic/printer/unknown_error_printer.rb', line 34

def print
  Pandocomatic::LOG.error self
  warn self
end