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.



131
132
133
134
135
136
# File 'lib/train/extras/command_wrapper.rb', line 131

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

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

Instance Method Details

#run(command) ⇒ Object



139
140
141
# File 'lib/train/extras/command_wrapper.rb', line 139

def run(command)
  powershell_wrap(command)
end