Class: Vigil::OS

Inherits:
Object
  • Object
show all
Defined in:
lib/vigil/os.rb

Instance Method Summary collapse

Instance Method Details

#__system(cmd) ⇒ Object



10
11
12
13
14
# File 'lib/vigil/os.rb', line 10

def __system cmd
  puts "# #{cmd}"
  system cmd
  return $? == 0
end

#_system(cmd) ⇒ Object



5
6
7
8
# File 'lib/vigil/os.rb', line 5

def _system cmd
  puts "# #{cmd}"
  system cmd or raise "Failed"
end

#chdir(*args) ⇒ Object



20
21
22
# File 'lib/vigil/os.rb', line 20

def chdir *args
  Dir.chdir *args
end

#entries(*args) ⇒ Object



32
33
34
# File 'lib/vigil/os.rb', line 32

def entries *args
  Dir.entries *args
end

#exists?(*args) ⇒ Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/vigil/os.rb', line 24

def exists? *args
  File.exists? *args
end

#ln(*args) ⇒ Object



28
29
30
# File 'lib/vigil/os.rb', line 28

def ln *args
  FileUtils.ln *args
end

#mkdir_p(*args) ⇒ Object



16
17
18
# File 'lib/vigil/os.rb', line 16

def mkdir_p *args
  FileUtils.mkdir_p *args
end