Class: CommandExecutor

Inherits:
Object
  • Object
show all
Includes:
Logging
Defined in:
lib/clenver/command_executor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Logging

configure_logger_for, #logger, logger_for

Constructor Details

#initialize(cmd) ⇒ CommandExecutor

Returns a new instance of CommandExecutor.



6
7
8
# File 'lib/clenver/command_executor.rb', line 6

def initialize(cmd)
  @cmd = cmd
end

Instance Attribute Details

#cmdObject

Returns the value of attribute cmd.



5
6
7
# File 'lib/clenver/command_executor.rb', line 5

def cmd
  @cmd
end

Instance Method Details

#executeObject



10
11
12
# File 'lib/clenver/command_executor.rb', line 10

def execute
  logger.info(%x[#{cmd}])
end