Class: Nobbie::Wx::Command::Executor

Inherits:
Object
  • Object
show all
Defined in:
lib/nobbie/wx/command/executor.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(reporter = Reporter.new) ⇒ Executor

Returns a new instance of Executor.



10
11
12
# File 'lib/nobbie/wx/command/executor.rb', line 10

def initialize(reporter = Reporter.new)
  @reporter = reporter
end

Instance Method Details

#execute(command) ⇒ Object



14
15
16
17
18
19
# File 'lib/nobbie/wx/command/executor.rb', line 14

def execute(command)
  @reporter.before_executing_command(command)
  result = command.execute
  @reporter.after_executing_command(result)
  result
end