Module: Vx::Lib::Shell

Defined in:
lib/vx/lib/shell.rb,
lib/vx/lib/shell/ssh.rb,
lib/vx/lib/shell/error.rb,
lib/vx/lib/shell/process.rb,
lib/vx/lib/shell/timeout.rb,
lib/vx/lib/shell/version.rb,
lib/vx/lib/shell/read_timeout.rb

Defined Under Namespace

Classes: Process, ReadTimeout, ReadTimeoutError, SSH, Timeout, TimeoutError

Constant Summary collapse

VERSION =
"0.1.2"
@@pool_interval =
1.0

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.pool_intervalObject



18
19
20
# File 'lib/vx/lib/shell.rb', line 18

def pool_interval
  @@pool_interval
end

.pool_interval=(val) ⇒ Object



22
23
24
# File 'lib/vx/lib/shell.rb', line 22

def pool_interval=(val)
  @@pool_interval = val
end

Instance Method Details

#open_ssh(*args, &block) ⇒ Object



27
28
29
# File 'lib/vx/lib/shell.rb', line 27

def open_ssh(*args, &block)
  Lib::Shell::SSH.open(*args, &block)
end

#sh(*args) ⇒ Object



31
32
33
34
35
36
37
38
39
# File 'lib/vx/lib/shell.rb', line 31

def sh(*args)
  case args.first
  when :ssh
    args.shift
    Shell::SSH.new(*args)
  else
    Shell::Process.new
  end
end

#spawn(*args, &block) ⇒ Object



41
42
43
# File 'lib/vx/lib/shell.rb', line 41

def spawn(*args, &block)
  Lib::Shell::Process.spawn(*args, &block)
end