Class: Seedie::Reporters::ConsoleReporter

Inherits:
BaseReporter show all
Defined in:
lib/seedie/reporters/console_reporter.rb

Constant Summary

Constants inherited from BaseReporter

BaseReporter::INDENT_SIZE

Instance Attribute Summary

Attributes inherited from BaseReporter

#output, #reports

Instance Method Summary collapse

Methods inherited from BaseReporter

#close

Constructor Details

#initializeConsoleReporter

Returns a new instance of ConsoleReporter.



6
7
8
# File 'lib/seedie/reporters/console_reporter.rb', line 6

def initialize
  super($stdout)
end

Instance Method Details

#update(event_type, options) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/seedie/reporters/console_reporter.rb', line 10

def update(event_type, options)
  update_indent_level(event_type)
  message = messages(event_type, options)
  @reports << { event_type: event_type, message: message }

  output.print "#{' ' * INDENT_SIZE * @indent_level}"
  output.puts message
end