class Ironment::Executor

Public Class Methods

new(options = {}) click to toggle source
# File lib/ironment/executor.rb, line 5
def initialize(options = {})
  @exec = options[:exec] || Exec.new
end

Public Instance Methods

exec(command, *args) click to toggle source
# File lib/ironment/executor.rb, line 9
def exec(command, *args)
  @exec.exec command, *args
rescue Errno::EACCES
  raise AccessDenied, command
rescue Errno::ENOENT
  raise NoEntity, command
rescue Errno::EISDIR
  raise IsDirectory, command
end