Class: Nanoc::CLI::StackTraceWriter Private
- Inherits:
-
Object
- Object
- Nanoc::CLI::StackTraceWriter
- Defined in:
- lib/nanoc/cli/stack_trace_writer.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#initialize(stream, forwards:) ⇒ StackTraceWriter
constructor
private
A new instance of StackTraceWriter.
- #write(error, verbose:) ⇒ Object private
Constructor Details
#initialize(stream, forwards:) ⇒ StackTraceWriter
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of StackTraceWriter.
6 7 8 9 |
# File 'lib/nanoc/cli/stack_trace_writer.rb', line 6 def initialize(stream, forwards:) @stream = stream @forwards = forwards end |
Instance Method Details
#write(error, verbose:) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
11 12 13 14 15 16 17 |
# File 'lib/nanoc/cli/stack_trace_writer.rb', line 11 def write(error, verbose:) if @forwards write_forwards(error, verbose: verbose) else write_backwards(error, verbose: verbose) end end |