Class: Helpers::Exec

Inherits:
Object
  • Object
show all
Defined in:
lib/spior/helpers.rb

Overview

Execute program using sudo when permission is required

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Exec

Returns a new instance of Exec.



46
47
48
# File 'lib/spior/helpers.rb', line 46

def initialize(name)
  @name = name
end

Instance Method Details

#run(args) ⇒ Object



50
51
52
# File 'lib/spior/helpers.rb', line 50

def run(args)
  Helpers.cmd("#{@name} #{args}")
end