Class: Vos::Drivers::Local

Inherits:
Vfs::Drivers::Local
  • Object
show all
Defined in:
lib/vos/drivers/local.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#boxObject

Returns the value of attribute box.



9
10
11
# File 'lib/vos/drivers/local.rb', line 9

def box
  @box
end

Instance Method Details

#bash(command) ⇒ Object



23
24
25
26
27
28
29
# File 'lib/vos/drivers/local.rb', line 23

def bash command
  code, stdout_and_stderr = Open3.popen2e command do |stdin, stdout_and_stderr, wait_thread|
    [wait_thread.value.to_i, stdout_and_stderr.read]
  end

  return code, stdout_and_stderr
end

#exec(command) ⇒ Object

Shell



14
15
16
17
18
19
20
# File 'lib/vos/drivers/local.rb', line 14

def exec command
  code, stdout, stderr = Open3.popen3 command do |stdin, stdout, stderr, waitth|
    [waitth.value.to_i, stdout.read, stderr.read]
  end

  return code, stdout, stderr
end

#hostObject

Other



34
# File 'lib/vos/drivers/local.rb', line 34

def host; 'localhost' end