Method: Convoy::Formatter::StreamOutputFormatter#initialize
- Defined in:
- lib/convoy/formatter/stream_output_formatter.rb
#initialize(stream = $stdout, options = {}, &block) ⇒ StreamOutputFormatter
10 11 12 13 14 15 16 17 |
# File 'lib/convoy/formatter/stream_output_formatter.rb', line 10 def initialize(stream = $stdout, = {}, &block) @stream = stream @max_output_width = [:max_output_width] || DEFAULT_OUTPUT_WIDTH @indent_string = [:indent_string] || DEFAULT_INDENT_STRING @current_indent = [:current_indent] || DEFAULT_INDENT @cursor_position = CursorPosition.new(@max_output_width) block.call(self) if block_given? end |