Module: AptControl::Exec::Helpers

Included in:
AptSite
Defined in:
lib/apt_control/exec.rb

Instance Method Summary collapse

Instance Method Details

#exec(command, options = {}) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/apt_control/exec.rb', line 24

def exec(command, options={})
  # use the options we were constructed with if they exist
  if respond_to?(:options)
    options[:quiet] = !self.options.verbose? unless options.has_key? :quiet
  end

  if respond_to? :exec_name
    options[:name] = exec_name unless options.has_key? :name
  end

  AptControl::Exec.exec(command, options)
end