Class: CommandExecutor
- Inherits:
-
Object
- Object
- CommandExecutor
- Includes:
- Logging
- Defined in:
- lib/clenver/command_executor.rb
Instance Attribute Summary collapse
-
#cmd ⇒ Object
Returns the value of attribute cmd.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(cmd) ⇒ CommandExecutor
constructor
A new instance of CommandExecutor.
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
#cmd ⇒ Object
Returns the value of attribute cmd.
5 6 7 |
# File 'lib/clenver/command_executor.rb', line 5 def cmd @cmd end |
Instance Method Details
#execute ⇒ Object
10 11 12 |
# File 'lib/clenver/command_executor.rb', line 10 def execute logger.info(%x[#{cmd}]) end |