Class: Nobbie::Wx::Command::ConsoleReporter
- Defined in:
- lib/nobbie/wx/command/console_reporter.rb
Overview
:nodoc:
Instance Method Summary collapse
- #after_executing_command(result) ⇒ Object
- #before_executing_command(command) ⇒ Object
-
#initialize(output_stream = STDOUT) ⇒ ConsoleReporter
constructor
A new instance of ConsoleReporter.
Constructor Details
#initialize(output_stream = STDOUT) ⇒ ConsoleReporter
Returns a new instance of ConsoleReporter.
10 11 12 |
# File 'lib/nobbie/wx/command/console_reporter.rb', line 10 def initialize(output_stream = STDOUT) @output_stream = output_stream end |
Instance Method Details
#after_executing_command(result) ⇒ Object
18 19 20 |
# File 'lib/nobbie/wx/command/console_reporter.rb', line 18 def after_executing_command(result) @output_stream.puts "< #{render(result)}" end |
#before_executing_command(command) ⇒ Object
14 15 16 |
# File 'lib/nobbie/wx/command/console_reporter.rb', line 14 def before_executing_command(command) @output_stream.puts "\n> #{command.describe}" end |