Class: Train::Extras::WindowsCommand

Inherits:
CommandWrapperBase show all
Defined in:
lib/train/extras/command_wrapper.rb

Overview

Wrap windows commands.

Instance Method Summary collapse

Methods inherited from CommandWrapperBase

#verify

Constructor Details

#initialize(backend, options) ⇒ WindowsCommand

Returns a new instance of WindowsCommand.



155
156
157
158
159
160
# File 'lib/train/extras/command_wrapper.rb', line 155

def initialize(backend, options)
  @backend = backend
  validate_options(options)

  @shell_command = options[:shell_command] # e.g. 'powershell'
end

Instance Method Details

#run(command) ⇒ Object



163
164
165
# File 'lib/train/extras/command_wrapper.rb', line 163

def run(command)
  powershell_wrap(command)
end