Class: Pleiades::Command::Executor

Inherits:
Object
  • Object
show all
Defined in:
lib/pleiades/core/command/executor.rb

Instance Method Summary collapse

Constructor Details

#initialize(command, method) ⇒ Executor

Returns a new instance of Executor.



4
5
6
7
# File 'lib/pleiades/core/command/executor.rb', line 4

def initialize(command, method)
  @to = command
  @method = method
end

Instance Method Details

#executeObject Also known as: call



9
10
11
12
# File 'lib/pleiades/core/command/executor.rb', line 9

def execute
  @to.__send__ @method
  @to
end