Class: Train::Extras::CommandWrapper

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

Class Method Summary collapse

Class Method Details

.load(transport, options) ⇒ Object



189
190
191
192
193
194
195
196
197
198
199
200
# File 'lib/train/extras/command_wrapper.rb', line 189

def self.load(transport, options)
  if transport.platform.unix?
    return nil unless LinuxCommand.active?(options)

    res = LinuxCommand.new(transport, options)
    res.verify!

    res
  elsif transport.platform.windows?
    WindowsCommand.new(transport, options)
  end
end